Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:44

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 import sys,os
0004 
0005 arguments=sys.argv
0006 sqlitename="ctppspixgain.db"
0007 tagname="CTPPSPixelGainCalibrations_test"
0008 runnumber=1
0009 if len(arguments)<3:
0010     print ("using defaults")
0011     print ("usage: cmsRun testReadDB_PixGainCalib_cfg.py  sqlitename tagname 111111")
0012 else:
0013     sqlitename = arguments[2]
0014     if len(arguments)>3: tagname= arguments[3]
0015     if len(arguments)>4: runnumber=int(arguments[4])
0016 
0017 process = cms.Process("ProcessOne")
0018 
0019 process.source = cms.Source("EmptyIOVSource",
0020     timetype = cms.string('runnumber'),
0021     firstValue = cms.uint64(runnumber),
0022     lastValue = cms.uint64(runnumber),
0023     interval = cms.uint64(1)
0024 )
0025 #Database output service
0026 
0027 process.load("CondCore.CondDB.CondDB_cfi")
0028 # input database (in this case local sqlite file)
0029 process.CondDB.connect = 'sqlite_file:'+sqlitename
0030 
0031 
0032 process.PoolDBESSource = cms.ESSource("PoolDBESSource",
0033     process.CondDB,
0034     DumpStat=cms.untracked.bool(True),
0035     toGet = cms.VPSet(cms.PSet(
0036         record = cms.string('CTPPSPixelGainCalibrationsRcd'),
0037         tag = cms.string(tagname)
0038     )),
0039 )
0040 
0041 
0042 
0043 process.myprodtest = cms.EDAnalyzer("CTPPSPixGainCalibsESAnalyzer")
0044 
0045 process.p = cms.Path(process.myprodtest)
0046 
0047