File indexing completed on 2023-03-17 10:47:46
0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003
0004 process = cms.Process('test')
0005
0006 import sys
0007 if len(sys.argv) > 3:
0008 startrun = sys.argv[2]
0009 subdir = sys.argv[3]+"/"
0010 else:
0011 print("not able to run")
0012 exit()
0013
0014
0015 process.source = cms.Source("EmptyIOVSource",
0016 timetype = cms.string('runnumber'),
0017 firstValue = cms.uint64(int(startrun)),
0018 lastValue = cms.uint64(int(startrun)),
0019 interval = cms.uint64(1)
0020 )
0021
0022
0023 process.load("CalibPPS.ESProducers.ctppsRPAlignmentCorrectionsDataESSourceXML_cfi")
0024
0025 process.ctppsRPAlignmentCorrectionsDataESSourceXML.RealFiles = cms.vstring(
0026 "CondFormats/PPSObjects/xml/sample_alignment_corrections.xml"
0027
0028
0029 )
0030 process.ctppsRPAlignmentCorrectionsDataESSourceXML.MeasuredFiles = cms.vstring("CondFormats/PPSObjects/xml/sample_alignment_corrections.xml")
0031 process.ctppsRPAlignmentCorrectionsDataESSourceXML.MisalignedFiles = cms.vstring("CondFormats/PPSObjects/xml/sample_alignment_corrections.xml")
0032
0033
0034
0035 process.load("CondCore.CondDB.CondDB_cfi")
0036
0037 process.CondDB.connect = 'sqlite_file:CTPPSRPRealAlignment_table.db'
0038
0039
0040 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0041 process.CondDB,
0042 timetype = cms.untracked.string('runnumber'),
0043 toPut = cms.VPSet(
0044 cms.PSet(
0045 record = cms.string('RPRealAlignmentRecord'),
0046 tag = cms.string('CTPPSRPAlignment_real_table'),
0047 )
0048 )
0049 )
0050
0051
0052
0053 process.writeCTPPSRPAlignments = cms.EDAnalyzer("CTPPSRPAlignmentInfoAnalyzer",
0054 cms.PSet(
0055 iov = cms.uint64(int(startrun)),
0056 record = cms.string("RPRealAlignmentRecord")
0057 )
0058 )
0059
0060 process.path = cms.Path(
0061 process.writeCTPPSRPAlignments
0062 )