CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CondTools/L1Trigger/python/L1CondDBIOVWriter_cff.py

Go to the documentation of this file.
00001 def initIOVWriter( process,
00002                    outputDBConnect = 'sqlite_file:l1config.db',
00003                    outputDBAuth = '.',
00004                    tagBaseVec = [],
00005                    tscKey = 'dummy' ):
00006     import FWCore.ParameterSet.Config as cms
00007     from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum
00008 
00009     if len( tagBaseVec ) == 0:
00010         from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags
00011         initL1UniformTags()
00012         tagBaseVec = initL1UniformTags.tagBaseVec                                
00013 
00014     process.load('CondTools.L1Trigger.L1CondDBIOVWriter_cfi')
00015     process.L1CondDBIOVWriter.tscKey = cms.string( tscKey )
00016 
00017     from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
00018     initIOVWriter.outputDB = cms.Service("PoolDBOutputService",
00019                                          CondDBSetup,
00020                                          connect = cms.string(outputDBConnect),
00021                                          toPut = cms.VPSet(cms.PSet(
00022         record = cms.string("L1TriggerKeyRcd"),
00023         tag = cms.string("L1TriggerKey_" + tagBaseVec[ L1CondEnum.L1TriggerKey ])),
00024                                                            cms.PSet(
00025         record = cms.string("L1TriggerKeyListRcd"),
00026         tag = cms.string("L1TriggerKeyList_" + tagBaseVec[ L1CondEnum.L1TriggerKeyList ]))
00027                                                            ))
00028     initIOVWriter.outputDB.DBParameters.authenticationPath = outputDBAuth
00029 
00030     from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
00031     initL1Subsystems( tagBaseVec = tagBaseVec )
00032     initIOVWriter.outputDB.toPut.extend(initL1Subsystems.params.recordInfo)
00033     process.add_(initIOVWriter.outputDB)