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