CMS 3D CMS Logo

Functions

addPoolDBESSource Namespace Reference

Functions

def addPoolDBESSource

Function Documentation

def addPoolDBESSource::addPoolDBESSource (   process,
  moduleName,
  record,
  tag,
  label = '',
  connect = 'sqlite_file:' 
)

Definition at line 3 of file addPoolDBESSource.py.

00003                                                                                  :'):
00004     from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup 
00005     calibDB = cms.ESSource("PoolDBESSource",
00006                            CondDBSetup,
00007                            timetype = cms.string('runnumber'),
00008                            toGet = cms.VPSet(cms.PSet(
00009                                record = cms.string(record),
00010                                tag = cms.string(tag),
00011                                label = cms.untracked.string(label)
00012                            )),
00013                            connect = cms.string(connect),
00014                            authenticationMethod = cms.untracked.uint32(0))
00015     #if authPath: calibDB.DBParameters.authenticationPath = authPath
00016     if connect.find('oracle:') != -1: calibDB.DBParameters.authenticationPath = '/afs/cern.ch/cms/DB/conddb'
00017     setattr(process,moduleName,calibDB)
00018     setattr(process,"es_prefer_" + moduleName,cms.ESPrefer('PoolDBESSource',moduleName))
00019