test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1CondDBPayloadWriterExt_cff.py
Go to the documentation of this file.
1 def initPayloadWriterExt( process,
2  outputDBConnect = 'sqlite_file:l1config.db',
3  outputDBAuth = '.',
4  tagBaseVec = [] ):
5  import FWCore.ParameterSet.Config as cms
6  from CondTools.L1TriggerExt.L1CondEnumExt_cfi import L1CondEnumExt
7 
8  if len( tagBaseVec ) == 0:
9  from CondTools.L1TriggerExt.L1UniformTagsExt_cfi import initL1UniformTagsExt
11  tagBaseVec = initL1UniformTagsExt.tagBaseVec
12 
13  process.load('CondTools.L1TriggerExt.L1CondDBPayloadWriterExt_cfi')
14 
15  from CondCore.CondDB.CondDB_cfi import CondDB
16  CondDB.connect = cms.string(outputDBConnect)
17 
18  initPayloadWriterExt.outputDB = cms.Service("PoolDBOutputService",
19  CondDB,
20  toPut = cms.VPSet(cms.PSet(
21  record = cms.string("L1TriggerKeyListExtRcd"),
22  tag = cms.string("L1TriggerKeyListExt_" + tagBaseVec[ L1CondEnumExt.L1TriggerKeyListExt ]))
23  ))
24  initPayloadWriterExt.outputDB.DBParameters.authenticationPath = outputDBAuth
25 
26  process.add_(initPayloadWriterExt.outputDB)