CMS 3D CMS Logo

dtVDriftSegmentWriter_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.StandardSequences.Eras import eras
3 
4 process = cms.Process("DTVDriftWriter",eras.Run3)
5 
6 
7 NEWDBFORMAT = False
8 
9 
10 process.load("CalibMuon.DTCalibration.messageLoggerDebug_cff")
11 process.MessageLogger.debugModules = cms.untracked.vstring('dtVDriftSegmentWriter')
12 
13 process.load("Configuration.StandardSequences.GeometryDB_cff")
14 process.load("Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff")
15 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
16 from Configuration.AlCa.autoCond import autoCond
17 process.GlobalTag.globaltag=autoCond['run3_data']
18 
19 process.load("CondCore.CondDB.CondDB_cfi")
20 
21 process.load("CalibMuon.DTCalibration.dtVDriftSegmentWriter_cfi")
22 
23 process.source = cms.Source("EmptySource",
24  numberEventsInRun = cms.untracked.uint32(1),
25  firstRun = cms.untracked.uint32(1)
26 )
27 
28 process.maxEvents = cms.untracked.PSet(
29  input = cms.untracked.int32(1)
30 )
31 
32 RECORD = 'DTMtimeRcd'
33 if NEWDBFORMAT :
34  RECORD = 'DTRecoConditionsVdriftRcd'
35  process.dtVDriftSegmentWriter.writeLegacyVDriftDB = False
36  # The following needs to be set as well if calibration should start use
37  # constants written in the new format as a starting point.
38  # process.dtVDriftSegmentWriter.vDriftAlgoConfig.readLegacyVDriftDB = False
39 
40 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
41  process.CondDB,
42  timetype = cms.untracked.string('runnumber'),
43  toPut = cms.VPSet(cms.PSet(
44  record = cms.string(RECORD),
45  tag = cms.string('vDrift')
46  ))
47 )
48 process.PoolDBOutputService.connect = cms.string('sqlite_file:vDrift.db')
49 
50 process.p = cms.Path(process.dtVDriftSegmentWriter)