Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-28 03:09:37

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 = int(sys.argv[2])
0008 else:
0009     startrun = 1
0010 process.source = cms.Source("EmptyIOVSource",
0011     timetype = cms.string('runnumber'),
0012     firstValue = cms.uint64(startrun),
0013     lastValue = cms.uint64(startrun),
0014     interval = cms.uint64(1)
0015 )
0016 
0017 
0018 # load the alignment xml file
0019 process.load("CalibPPS.ESProducers.ctppsRPAlignmentCorrectionsDataESSourceXML_cfi")
0020 process.ctppsRPAlignmentCorrectionsDataESSourceXML.RealFiles = cms.vstring("CondFormats/PPSObjects/xml/sample_alignment_corrections.xml")
0021 #process.ctppsRPAlignmentCorrectionsDataESSourceXML.RealFiles = cms.vstring(
0022 #    "CondTools/CTPPS/test/RPixGeometryCorrections.xml",
0023 #    "CondTools/CTPPS/test/largeXMLmanipulations/real_alignment_iov"+str(startrun)+".xml"
0024 #    )
0025 
0026 process.ctppsRPAlignmentCorrectionsDataESSourceXML.MeasuredFiles = cms.vstring("CondFormats/PPSObjects/xml/sample_alignment_corrections.xml")
0027 process.ctppsRPAlignmentCorrectionsDataESSourceXML.MisalignedFiles = cms.vstring("CondFormats/PPSObjects/xml/sample_alignment_corrections.xml")
0028 
0029 
0030 #Database output service
0031 process.load("CondCore.CondDB.CondDB_cfi")
0032 # output database (in this case local sqlite file)
0033 process.CondDB.connect = 'sqlite_file:CTPPSRPAlignment_singletest.db'
0034 
0035 
0036 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0037     process.CondDB,
0038     timetype = cms.untracked.string('runnumber'),
0039     toPut = cms.VPSet(
0040     cms.PSet(
0041         record = cms.string('RPRealAlignmentRecord'),
0042         tag = cms.string('CTPPSRPAlignment_real'),
0043     )
0044   )
0045 )
0046 
0047 
0048 # print the mapping and analysis mask
0049 process.writeCTPPSRPAlignments = cms.EDAnalyzer("CTPPSRPAlignmentInfoAnalyzer",
0050     cms.PSet(
0051         iov = cms.uint64(startrun),
0052         record = cms.string("RPRealAlignmentRecord")
0053     )
0054 )
0055 
0056 process.path = cms.Path(
0057   process.writeCTPPSRPAlignments
0058 )