Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mf geometry payload #89

Merged
merged 7 commits into from
Jul 17, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CondCore/GeometryPlugins/plugins/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "Geometry/Records/interface/CSCRecoGeometryRcd.h"
#include "Geometry/Records/interface/DTRecoGeometryRcd.h"
#include "Geometry/Records/interface/RPCRecoGeometryRcd.h"
#include "Geometry/Records/interface/GEMRecoGeometryRcd.h"

#include "CondFormats/GeometryObjects/interface/PGeometricDetExtra.h"
#include "Geometry/Records/interface/PGeometricDetExtraRcd.h"
Expand All @@ -40,3 +41,4 @@ REGISTER_PLUGIN(CSCRecoDigiParametersRcd,CSCRecoDigiParameters);
REGISTER_PLUGIN(CSCRecoGeometryRcd,RecoIdealGeometry);
REGISTER_PLUGIN(DTRecoGeometryRcd,RecoIdealGeometry);
REGISTER_PLUGIN(RPCRecoGeometryRcd,RecoIdealGeometry);
REGISTER_PLUGIN(GEMRecoGeometryRcd,RecoIdealGeometry);
6 changes: 6 additions & 0 deletions CondTools/Geometry/test/geSingleBigFile.xml
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>

12 changes: 12 additions & 0 deletions CondTools/Geometry/test/writehelpers/GEMRECO_Geometry.txt
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 CondTools/Geometry/test/writehelpers/GeometryFileExtended2019.txt
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 CondTools/Geometry/test/writehelpers/HCALRECO_Geometry.txt
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 CondTools/Geometry/test/writehelpers/createExtended2019Payloads.sh
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
8 changes: 8 additions & 0 deletions CondTools/Geometry/test/writehelpers/createPayloads.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ sed -i '{s/Services30Percent/HFLibraryNoCastor/g}' geometryxmlwriter.py
sed -i '{s/\/geservices30percent/\/gehflibrarynocastor/g}' geometryxmlwriter.py
cmsRun geometryxmlwriter.py

sed -i '{s/HFLibraryNoCastor/ZeroMaterial/g}' geometryxmlwriter.py
sed -i '{s/\/gehflibrarynocastor/\/zeromaterial/g}' geometryxmlwriter.py
cmsRun geometryxmlwriter.py

# Read the one big XML file and output a record to the
# database with the an identifying tag
# This is repeated several times below. The sed commands
Expand Down Expand Up @@ -151,6 +155,10 @@ sed -i '{s/Services30Percent/HFLibraryNoCastor/g}' xmlgeometrywriter.py
sed -i '{s/\/geservices30percent/\/gehflibrarynocastor/g}' xmlgeometrywriter.py
cmsRun xmlgeometrywriter.py

sed -i '{s/HFLibraryNoCastor/ZeroMaterial/g}' xmlgeometrywriter.py
sed -i '{s/\/gehflibrarynocastor/\/zeromaterial/g}' xmlgeometrywriter.py
cmsRun xmlgeometrywriter.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
Expand Down
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)
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)

40 changes: 40 additions & 0 deletions CondTools/Geometry/test/writehelpers/mfwriter.py
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)
25 changes: 25 additions & 0 deletions CondTools/Geometry/test/writehelpers/mfxmlwriter.py
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 CondTools/Geometry/test/writehelpers/splitExtended2019Database.sh
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
6 changes: 6 additions & 0 deletions Configuration/Geometry/python/MagneticFieldGeometryDB_cff.py
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 *
7 changes: 7 additions & 0 deletions Configuration/Geometry/python/MagneticFieldGeometry_cff.py
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 *

Loading