test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1CondDBIOVWriterExt_cff.py
Go to the documentation of this file.
1 def initIOVWriterExt( process,
2  outputDBConnect = 'sqlite_file:l1config.db',
3  outputDBAuth = '.',
4  tagBaseVec = [],
5  tscKey = 'dummy',
6  rsKey = 'dummy' ):
7  import FWCore.ParameterSet.Config as cms
8  from CondTools.L1TriggerExt.L1CondEnumExt_cfi import L1CondEnumExt
9 
10  if len( tagBaseVec ) == 0:
11  from CondTools.L1TriggerExt.L1UniformTagsExt_cfi import initL1UniformTagsExt
13  tagBaseVec = initL1UniformTagsExt.tagBaseVec
14 
15  process.load('CondTools.L1TriggerExt.L1CondDBIOVWriterExt_cfi')
16  process.L1CondDBIOVWriterExt.tscKey = cms.string( tscKey )
17  process.L1CondDBIOVWriterExt.rsKey = cms.string( rsKey )
18 
19  from CondCore.CondDB.CondDB_cfi import CondDB
20  CondDB.connect = cms.string(outputDBConnect)
21 
22  initIOVWriterExt.outputDB = cms.Service("PoolDBOutputService",
23  CondDB,
24  toPut = cms.VPSet(cms.PSet(
25  record = cms.string("L1TriggerKeyExtRcd"),
26  tag = cms.string("L1TriggerKeyExt_" + tagBaseVec[ L1CondEnumExt.L1TriggerKeyExt ])),
27  cms.PSet(
28  record = cms.string("L1TriggerKeyListExtRcd"),
29  tag = cms.string("L1TriggerKeyListExt_" + tagBaseVec[ L1CondEnumExt.L1TriggerKeyListExt ]))
30  ))
31  initIOVWriterExt.outputDB.DBParameters.authenticationPath = outputDBAuth
32 
33  from CondTools.L1TriggerExt.L1SubsystemParamsExt_cfi import initL1SubsystemsExt
34  initL1SubsystemsExt( tagBaseVec = tagBaseVec )
35  initIOVWriterExt.outputDB.toPut.extend(initL1SubsystemsExt.params.recordInfo)
36  process.add_(initIOVWriterExt.outputDB)