File indexing completed on 2024-04-06 12:03:12
0001 def initPayloadWriter( process,
0002 outputDBConnect = 'sqlite_file:l1config.db',
0003 outputDBAuth = '.',
0004 tagBaseVec = [] ):
0005 import FWCore.ParameterSet.Config as cms
0006 from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum
0007
0008 if len( tagBaseVec ) == 0:
0009 from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags
0010 initL1UniformTags()
0011 tagBaseVec = initL1UniformTags.tagBaseVec
0012
0013 process.load('CondTools.L1Trigger.L1CondDBPayloadWriter_cfi')
0014
0015 from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
0016 initPayloadWriter.outputDB = cms.Service("PoolDBOutputService",
0017 CondDBSetup,
0018 connect = cms.string(outputDBConnect),
0019 toPut = cms.VPSet(cms.PSet(
0020 record = cms.string("L1TriggerKeyListRcd"),
0021 tag = cms.string("L1TriggerKeyList_" + tagBaseVec[ L1CondEnum.L1TriggerKeyList ]))
0022 ))
0023 initPayloadWriter.outputDB.DBParameters.authenticationPath = outputDBAuth
0024 process.add_(initPayloadWriter.outputDB)