test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.

3 
4 def addPoolDBESSource(process,moduleName,record,tag,label='',connect='sqlite_file:'):
5  from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
6  calibDB = cms.ESSource("PoolDBESSource",
7  CondDBSetup,
8  timetype = cms.string('runnumber'),
9  toGet = cms.VPSet(cms.PSet(
10  record = cms.string(record),
11  tag = cms.string(tag),
12  label = cms.untracked.string(label)
13  )),
14  connect = cms.string(connect),
15  authenticationMethod = cms.untracked.uint32(0))
16  #if authPath: calibDB.DBParameters.authenticationPath = authPath
17  if connect.find('oracle:') != -1: calibDB.DBParameters.authenticationPath = '/afs/cern.ch/cms/DB/conddb'
18  setattr(process,moduleName,calibDB)
19  setattr(process,"es_prefer_" + moduleName,cms.ESPrefer('PoolDBESSource',moduleName))