Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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 #     path = 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(303832),
0018     lastValue = cms.uint64(303833),
0019     interval = cms.uint64(1)
0020 )
0021 
0022 # load the alignment xml file
0023 process.load("CalibPPS.ESProducers.ctppsRPAlignmentCorrectionsDataESSourceXML_cfi")
0024 #process.ctppsRPAlignmentCorrectionsDataESSourceXML.XMLFile = cms.string("CondFormats/PPSObjects/xml/sample_alignment_corrections.xml")
0025 process.ctppsRPAlignmentCorrectionsDataESSourceXML.RealFiles = cms.vstring(
0026     "CondFormats/PPSObjects/xml/sample_alignment_corrections.xml"
0027     #"CondTools/CTPPS/test/largeXMLmanipulations/real_alignment_iov303832.xml"
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 #Database output service
0034 process.load("CondCore.CondDB.CondDB_cfi")
0035 # output database (in this case local sqlite file)
0036 process.CondDB.connect = 'sqlite_file:CTPPSRPRealAlignment_table_test.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 # print the mapping and analysis mask
0052 process.writeCTPPSRPAlignments = cms.EDAnalyzer("CTPPSRPAlignmentInfoAnalyzer",
0053     cms.PSet(
0054         iov = cms.uint64(303832),
0055         record = cms.string("RPRealAlignmentRecord")
0056     )
0057 )
0058 
0059 process.path = cms.Path(
0060   process.writeCTPPSRPAlignments
0061 )