CMS 3D CMS Logo

convertXMLtoSQLite_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import sys
3 
4 process = cms.Process("CONVERT")
5 process.source = cms.Source("EmptySource")
6 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
7 
8 process.load("Configuration.Geometry.GeometryIdeal_cff")
9 process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi")
10 
11 process.DTGeometryAlInputXML = cms.ESProducer("DTGeometryESModule",
12  appendToDataLabel = cms.string('idealForInputXML'),
13  applyAlignment = cms.bool(False),
14  alignmentsLabel = cms.string(''),
15  fromDDD = cms.bool(True)
16 )
17 
18 process.CSCGeometryAlInputXML = cms.ESProducer("CSCGeometryESModule",
19  appendToDataLabel = cms.string('idealForInputXML'),
20  debugV = cms.untracked.bool(False),
21  useGangedStripsInME1a = cms.bool(False),
22  alignmentsLabel = cms.string(''),
23  useOnlyWiresInME1a = cms.bool(False),
24  useRealWireGeometry = cms.bool(True),
25  useCentreTIOffsets = cms.bool(False),
26  applyAlignment = cms.bool(False),
27  useDDD = cms.bool(True)
28 )
29 
30 process.MuonGeometryDBConverter = cms.EDAnalyzer("MuonGeometryDBConverter",
31  input = cms.string("xml"),
32  fileName = cms.string(str(sys.argv[1])),
33  shiftErr = cms.double(1000.),
34  angleErr = cms.double(6.28),
35  output = cms.string("db"))
36 
37 process.load("CondCore.DBCommon.CondDBSetup_cfi")
38 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
39  process.CondDBSetup,
40  connect = cms.string("sqlite_file:"+str(sys.argv[1])[:-3]+"db"),
41  toPut = cms.VPSet(
42  cms.PSet(record = cms.string("DTAlignmentRcd"), tag = cms.string("DTAlignmentRcd")),
43  cms.PSet(record = cms.string("DTAlignmentErrorExtendedRcd"), tag = cms.string("DTAlignmentErrorExtendedRcd")),
44  cms.PSet(record = cms.string("CSCAlignmentRcd"), tag = cms.string("CSCAlignmentRcd")),
45  cms.PSet(record = cms.string("CSCAlignmentErrorExtendedRcd"), tag = cms.string("CSCAlignmentErrorExtendedRcd"))))
46 
47 process.inertGlobalPositionRcd = cms.ESSource("PoolDBESSource",
48  process.CondDBSetup,
49  connect = cms.string("sqlite_file:inertGlobalPositionRcd.db"),
50  toGet = cms.VPSet(cms.PSet(record = cms.string("GlobalPositionRcd"), tag = cms.string("inertGlobalPositionRcd"))))
51 
52 process.Path = cms.Path(process.MuonGeometryDBConverter)
#define str(s)