CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1CondDBIOVWriter_cff.py
Go to the documentation of this file.
1 def initIOVWriter( process,
2  outputDBConnect = 'sqlite_file:l1config.db',
3  outputDBAuth = '.',
4  tagBaseVec = [],
5  tscKey = 'dummy' ):
6  import FWCore.ParameterSet.Config as cms
7  from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum
8 
9  if len( tagBaseVec ) == 0:
10  from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags
12  tagBaseVec = initL1UniformTags.tagBaseVec
13 
14  process.load('CondTools.L1Trigger.L1CondDBIOVWriter_cfi')
15  process.L1CondDBIOVWriter.tscKey = cms.string( tscKey )
16 
17  from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
18  initIOVWriter.outputDB = cms.Service("PoolDBOutputService",
19  CondDBSetup,
20  connect = cms.string(outputDBConnect),
21  toPut = cms.VPSet(cms.PSet(
22  record = cms.string("L1TriggerKeyRcd"),
23  tag = cms.string("L1TriggerKey_" + tagBaseVec[ L1CondEnum.L1TriggerKey ])),
24  cms.PSet(
25  record = cms.string("L1TriggerKeyListRcd"),
26  tag = cms.string("L1TriggerKeyList_" + tagBaseVec[ L1CondEnum.L1TriggerKeyList ]))
27  ))
28  initIOVWriter.outputDB.DBParameters.authenticationPath = outputDBAuth
29 
30  from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
31  initL1Subsystems( tagBaseVec = tagBaseVec )
32  initIOVWriter.outputDB.toPut.extend(initL1Subsystems.params.recordInfo)
33  process.add_(initIOVWriter.outputDB)