Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:17

0001 def initIOVWriter( process,
0002                    outputDBConnect = 'sqlite_file:l1config.db',
0003                    outputDBAuth = '.',
0004                    tagBaseVec = [],
0005                    tscKey = 'dummy' ):
0006     import FWCore.ParameterSet.Config as cms
0007     from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum
0008 
0009     if len( tagBaseVec ) == 0:
0010         from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags
0011         initL1UniformTags()
0012         tagBaseVec = initL1UniformTags.tagBaseVec                                
0013 
0014     process.load('CondTools.L1Trigger.L1CondDBIOVWriter_cfi')
0015     process.L1CondDBIOVWriter.tscKey = cms.string( tscKey )
0016 
0017     from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
0018     initIOVWriter.outputDB = cms.Service("PoolDBOutputService",
0019                                          CondDBSetup,
0020                                          connect = cms.string(outputDBConnect),
0021                                          toPut = cms.VPSet(cms.PSet(
0022         record = cms.string("L1TriggerKeyRcd"),
0023         tag = cms.string("L1TriggerKey_" + tagBaseVec[ L1CondEnum.L1TriggerKey ])),
0024                                                            cms.PSet(
0025         record = cms.string("L1TriggerKeyListRcd"),
0026         tag = cms.string("L1TriggerKeyList_" + tagBaseVec[ L1CondEnum.L1TriggerKeyList ]))
0027                                                            ))
0028     initIOVWriter.outputDB.DBParameters.authenticationPath = outputDBAuth
0029 
0030     from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
0031     initL1Subsystems( tagBaseVec = tagBaseVec )
0032     initIOVWriter.outputDB.toPut.extend(initL1Subsystems.params.recordInfo)
0033     process.add_(initIOVWriter.outputDB)