-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from ianna/mf-geometry-payload
Mf geometry payload
- Loading branch information
Showing
19 changed files
with
679 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd"> | ||
</DDDefinition> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"destinationDatabase": "oracle://cms_orcoff_prep/CMS_COND_GEOMETRY", | ||
"destinationTags": { | ||
"GEMRECO_Geometry_TagXX": { | ||
"dependencies": {}, | ||
"synchronizeTo": "offline" | ||
} | ||
}, | ||
"inputTag": "GEMRECO_Geometry_TagXX", | ||
"since": null, | ||
"userText": "GEM geometry payload config TagXX" | ||
} |
12 changes: 12 additions & 0 deletions
12
CondTools/Geometry/test/writehelpers/GeometryFileExtended2019.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"destinationDatabase": "oracle://cms_orcoff_prep/CMS_COND_GEOMETRY", | ||
"destinationTags": { | ||
"XMLFILE_Geometry_TagXX_Extended2019_mc": { | ||
"dependencies": {}, | ||
"synchronizeTo": "offline" | ||
} | ||
}, | ||
"inputTag": "XMLFILE_Geometry_TagXX_Extended2019_mc", | ||
"since": null, | ||
"userText": "Geometry payload for Full DDD XML Extended 2019 config TagXX" | ||
} |
12 changes: 12 additions & 0 deletions
12
CondTools/Geometry/test/writehelpers/HCALRECO_Geometry.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"destinationDatabase": "oracle://cms_orcoff_prep/CMS_COND_GEOMETRY_000", | ||
"destinationTags": { | ||
"HCALRECO_Geometry_TagXX": { | ||
"dependencies": {}, | ||
"synchronizeTo": "offline" | ||
} | ||
}, | ||
"inputTag": "HCALRECO_Geometry_TagXX", | ||
"since": null, | ||
"userText": "HCAL reco geometry with dense index TagXX" | ||
} |
34 changes: 34 additions & 0 deletions
34
CondTools/Geometry/test/writehelpers/createExtended2019Payloads.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
|
||
if [ $# -ne 1 ] | ||
then | ||
echo Error: createExtended2019Payloads.sh requires exactly one argument which is the tag | ||
exit 1 | ||
fi | ||
mytag=$1 | ||
echo ${mytag} | ||
|
||
# Set the tag in all the scripts and the metadata text files | ||
sed -i {s/TagXX/${mytag}/g} *.py | ||
sed -i {s/TagXX/${mytag}/g} *.txt | ||
sed -i {s/TagXX/${mytag}/g} splitExtended2019Database.sh | ||
|
||
# First read in the little XML files and create the | ||
# large XML file for the Phase1_R30F12_HCal Ideal scenario. | ||
# Input cff Output file | ||
# GeometryExtended2019_cff geSingleBigFile.xml | ||
cmsRun geometryExtended2019_xmlwriter.py | ||
|
||
# Now convert the content of the large XML file into | ||
# a "blob" and write it to the database. | ||
# Also reads in the little XML files again and fills | ||
# the DDCompactView. From the DDCompactView the | ||
# reco parts of the database are also filled. | ||
cmsRun geometryExtended2019_writer.py | ||
|
||
# All the database objects were written into one database | ||
# (myfile.db) in the steps above. Extract the different | ||
# pieces into separate database files. These are the payloads | ||
# that get uploaded to the dropbox. There is one for each tag | ||
./splitExtended2019Database.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
CondTools/Geometry/test/writehelpers/geometryExtended2019_writer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("GeometryWriter") | ||
process.load("CondCore.DBCommon.CondDBCommon_cfi") | ||
|
||
# This will read all the little XML files and from | ||
# that fill the DDCompactView. The modules that fill | ||
# the reco part of the database need the DDCompactView. | ||
process.load('Configuration.Geometry.GeometryExtended2019_cff') | ||
process.load('Geometry.MuonNumbering.muonNumberingInitialization_cfi') | ||
process.load('Geometry.CaloEventSetup.CaloGeometryDBWriter_cfi') | ||
|
||
import Geometry.HcalEventSetup.hcalSLHCTopologyConstants_cfi as hcalTopologyConstants_cfi | ||
process.hcalTopologyIdeal.hcalTopologyConstants = cms.PSet(hcalTopologyConstants_cfi.hcalTopologyConstants) | ||
|
||
process.source = cms.Source("EmptyIOVSource", | ||
lastValue = cms.uint64(1), | ||
timetype = cms.string('runnumber'), | ||
firstValue = cms.uint64(1), | ||
interval = cms.uint64(1) | ||
) | ||
|
||
# This reads the big XML file and the only way to fill the | ||
# nonreco part of the database is to read this file. It | ||
# somewhat duplicates the information read from the little | ||
# XML files, but there is no way to directly build the | ||
# DDCompactView from this. | ||
process.XMLGeometryWriter = cms.EDAnalyzer("XMLGeometryBuilder", | ||
XMLFileName = cms.untracked.string("./geSingleBigFile.xml"), | ||
ZIP = cms.untracked.bool(True) | ||
) | ||
process.TrackerGeometricDetExtraESModule = cms.ESProducer( "TrackerGeometricDetExtraESModule", | ||
fromDDD = cms.bool( True ), | ||
) | ||
|
||
process.TrackerGeometryWriter = cms.EDAnalyzer("PGeometricDetBuilder") | ||
process.TrackerGeometryExtraWriter = cms.EDAnalyzer("PGeometricDetExtraBuilder") | ||
|
||
process.CaloGeometryWriter = cms.EDAnalyzer("PCaloGeometryBuilder") | ||
|
||
process.CSCGeometryWriter = cms.EDAnalyzer("CSCRecoIdealDBLoader") | ||
|
||
process.DTGeometryWriter = cms.EDAnalyzer("DTRecoIdealDBLoader") | ||
|
||
process.RPCGeometryWriter = cms.EDAnalyzer("RPCRecoIdealDBLoader") | ||
|
||
process.GEMGeometryWriter = cms.EDAnalyzer("GEMRecoIdealDBLoader") | ||
|
||
process.CondDBCommon.BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') | ||
process.CondDBCommon.timetype = cms.untracked.string('runnumber') | ||
process.CondDBCommon.connect = cms.string('sqlite_file:myfile.db') | ||
process.PoolDBOutputService = cms.Service("PoolDBOutputService", | ||
process.CondDBCommon, | ||
toPut = cms.VPSet(cms.PSet(record = cms.string('GeometryFileRcd'),tag = cms.string('XMLFILE_Geometry_TagXX_Extended2019_mc')), | ||
cms.PSet(record = cms.string('IdealGeometryRecord'),tag = cms.string('TKRECO_Geometry_Extended2019_TagXX')), | ||
cms.PSet(record = cms.string('PGeometricDetExtraRcd'),tag = cms.string('TKExtra_Geometry_Extended2019_TagXX')), | ||
cms.PSet(record = cms.string('PEcalBarrelRcd'), tag = cms.string('EBRECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('PEcalEndcapRcd'), tag = cms.string('EERECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('PEcalPreshowerRcd'),tag = cms.string('EPRECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('PHcalRcd'), tag = cms.string('HCALRECO_Geometry_Extended2019_TagXX')), | ||
cms.PSet(record = cms.string('PCaloTowerRcd'), tag = cms.string('CTRECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('PZdcRcd'), tag = cms.string('ZDCRECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('PCastorRcd'), tag = cms.string('CASTORRECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('CSCRecoGeometryRcd'),tag = cms.string('CSCRECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('CSCRecoDigiParametersRcd'),tag = cms.string('CSCRECODIGI_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('DTRecoGeometryRcd'),tag = cms.string('DTRECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('RPCRecoGeometryRcd'),tag = cms.string('RPCRECO_Geometry_TagXX')), | ||
cms.PSet(record = cms.string('GEMRecoGeometryRcd'),tag = cms.string('GEMRECO_Geometry_TagXX')) | ||
) | ||
) | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
process.p1 = cms.Path(process.XMLGeometryWriter+process.TrackerGeometryWriter+process.TrackerGeometryExtraWriter+process.CaloGeometryWriter+process.CSCGeometryWriter+process.DTGeometryWriter+process.RPCGeometryWriter+process.GEMGeometryWriter) |
25 changes: 25 additions & 0 deletions
25
CondTools/Geometry/test/writehelpers/geometryExtended2019_xmlwriter.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("GeometryXMLWriter") | ||
process.load("CondCore.DBCommon.CondDBCommon_cfi") | ||
process.load('Configuration.Geometry.GeometryExtended2019_cff') | ||
|
||
process.source = cms.Source("EmptyIOVSource", | ||
lastValue = cms.uint64(1), | ||
timetype = cms.string('runnumber'), | ||
firstValue = cms.uint64(1), | ||
interval = cms.uint64(1) | ||
) | ||
|
||
process.BigXMLWriter = cms.EDAnalyzer("OutputDDToDDL", | ||
rotNumSeed = cms.int32(0), | ||
fileName = cms.untracked.string("./geSingleBigFile.xml") | ||
) | ||
|
||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
process.p1 = cms.Path(process.BigXMLWriter) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("MagneticFieldWriter") | ||
process.load("CondCore.DBCommon.CondDBCommon_cfi") | ||
|
||
# This will read all the little XML files and from | ||
# that fill the DDCompactView. The modules that fill | ||
# the reco part of the database need the DDCompactView. | ||
process.load('Configuration.Geometry.MagneticFieldGeometry_cff') | ||
|
||
process.source = cms.Source("EmptyIOVSource", | ||
lastValue = cms.uint64(1), | ||
timetype = cms.string('runnumber'), | ||
firstValue = cms.uint64(1), | ||
interval = cms.uint64(1) | ||
) | ||
|
||
# This reads the big XML file and the only way to fill the | ||
# nonreco part of the database is to read this file. It | ||
# somewhat duplicates the information read from the little | ||
# XML files, but there is no way to directly build the | ||
# DDCompactView from this. | ||
process.XMLGeometryWriter = cms.EDAnalyzer("XMLGeometryBuilder", | ||
XMLFileName = cms.untracked.string("./mfSingleBigFile.xml"), | ||
ZIP = cms.untracked.bool(True) | ||
) | ||
|
||
process.CondDBCommon.BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService') | ||
process.CondDBCommon.timetype = cms.untracked.string('runnumber') | ||
process.CondDBCommon.connect = cms.string('sqlite_file:myfile.db') | ||
process.PoolDBOutputService = cms.Service("PoolDBOutputService", | ||
process.CondDBCommon, | ||
toPut = cms.VPSet(cms.PSet(record = cms.string('GeometryFileRcd'),tag = cms.string('XMLFILE_MagneticFieldGeometry_TagXX'))) | ||
) | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
process.p1 = cms.Path(process.XMLGeometryWriter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("MagneticFieldXMLWriter") | ||
process.load("CondCore.DBCommon.CondDBCommon_cfi") | ||
process.load('Configuration.Geometry.MagneticFieldGeometry_cff') | ||
|
||
process.source = cms.Source("EmptyIOVSource", | ||
lastValue = cms.uint64(1), | ||
timetype = cms.string('runnumber'), | ||
firstValue = cms.uint64(1), | ||
interval = cms.uint64(1) | ||
) | ||
|
||
process.BigXMLWriter = cms.EDAnalyzer("OutputMagneticFieldDDToDDL", | ||
rotNumSeed = cms.int32(0), | ||
fileName = cms.untracked.string("./mfSingleBigFile.xml") | ||
) | ||
|
||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
process.p1 = cms.Path(process.BigXMLWriter) | ||
|
17 changes: 17 additions & 0 deletions
17
CondTools/Geometry/test/writehelpers/splitExtended2019Database.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:GeometryFileExtended2019.db -D CondFormatsGeometryObjects -t XMLFILE_Geometry_TagXX_Extended2019_mc -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:TKRECO_Geometry.db -D CondFormatsGeometryObjects -t TKRECO_Geometry_Extended2019_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:TKExtra_Geometry.db -D CondFormatsGeometryObjects -t TKExtra_Geometry_Extended2019_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:EBRECO_Geometry.db -D CondFormatsGeometryObjects -t EBRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:EERECO_Geometry.db -D CondFormatsGeometryObjects -t EERECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:EPRECO_Geometry.db -D CondFormatsGeometryObjects -t EPRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:HCALRECO_Geometry.db -D CondFormatsGeometryObjects -t HCALRECO_Geometry_Extended2019_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:CTRECO_Geometry.db -D CondFormatsGeometryObjects -t CTRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:ZDCRECO_Geometry.db -D CondFormatsGeometryObjects -t ZDCRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:CASTORRECO_Geometry.db -D CondFormatsGeometryObjects -t CASTORRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:CSCRECO_Geometry.db -D CondFormatsGeometryObjects -t CSCRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:CSCRECODIGI_Geometry.db -D CondFormatsGeometryObjects -t CSCRECODIGI_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:DTRECO_Geometry.db -D CondFormatsGeometryObjects -t DTRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:RPCRECO_Geometry.db -D CondFormatsGeometryObjects -t RPCRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db | ||
cmscond_export_iov -s sqlite_file:myfile.db -d sqlite_file:GEMRECO_Geometry.db -D CondFormatsGeometryObjects -t GEMRECO_Geometry_TagXX -l sqlite_file:localpopconlog.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
# | ||
# Magnetic Field Geometry master configuration | ||
# | ||
from GeometryReaders.XMLIdealGeometryESSource.cmsMagneticFieldGeometryDB_cff import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
# | ||
# Magnetic Field Geometry master configuration | ||
# | ||
from Geometry.CMSCommonData.cmsMagneticFieldGeometryXML_cfi import * | ||
|
Oops, something went wrong.