File indexing completed on 2024-04-06 12:25:20
0001 import FWCore.ParameterSet.VarParsing as VarParsing
0002
0003 ivars = VarParsing.VarParsing('standard')
0004
0005 ivars.register ('outputTag',
0006 mult=ivars.multiplicity.singleton,
0007 mytype=ivars.varType.string,
0008 info="for testing")
0009 ivars.outputTag="demo"
0010
0011 ivars.register ('inputFile',
0012 mult=ivars.multiplicity.singleton,
0013 mytype=ivars.varType.string,
0014 info="for testing")
0015
0016 ivars.register ('outputFile',
0017 mult=ivars.multiplicity.singleton,
0018 mytype=ivars.varType.string,
0019 info="for testing")
0020
0021 ivars.inputFile="./ue_calibrations_pf_data.txt"
0022 ivars.outputFile="./output.db"
0023
0024 ivars.parseArguments()
0025
0026 import FWCore.ParameterSet.Config as cms
0027
0028 process = cms.Process('DUMMY')
0029
0030 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))
0031 process.source = cms.Source("EmptyIOVSource",
0032 timetype = cms.string("runnumber"),
0033 firstValue = cms.uint64(1),
0034 lastValue = cms.uint64(1),
0035 interval = cms.uint64(1)
0036 )
0037
0038 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0039 process.CondDBCommon.connect = "sqlite_file:" + ivars.outputFile
0040
0041 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
0042 process.CondDBCommon,
0043 timetype = cms.untracked.string("runnumber"),
0044 toPut = cms.VPSet(cms.PSet(record = cms.string('HeavyIonRcd'),
0045 tag = cms.string(ivars.outputTag)
0046 )
0047 )
0048 )
0049
0050 process.makeUETableDB = cms.EDAnalyzer('UETableProducer',
0051 txtFile = cms.string(ivars.inputFile)
0052 )
0053
0054 process.step = cms.Path(process.makeUETableDB)