CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
L1CondDBSourceExt_cff Namespace Reference

Functions

def initCondDBSourceExt
 

Function Documentation

def L1CondDBSourceExt_cff.initCondDBSourceExt (   process,
  inputDBConnect = 'frontier://FrontierProd/CMS_CONDITIONS',
  inputDBAuth = '.',
  tagBase = "",
  tagBaseVec = [],
  includeAllTags = False,
  includeRSTags = False,
  applyESPrefer = True 
)

Definition at line 16 of file L1CondDBSourceExt_cff.py.

References L1O2OTagsExt_cfi.initL1O2OTagsExt(), L1RSSubsystemParamsExt_cfi.initL1RSSubsystemsExt(), L1SubsystemParamsExt_cfi.initL1SubsystemsExt(), and L1UniformTagsExt_cfi.initL1UniformTagsExt().

16 
17  applyESPrefer = True ):
18  import FWCore.ParameterSet.Config as cms
19  from CondTools.L1TriggerExt.L1CondEnumExt_cfi import L1CondEnumExt
20 
21  if len( tagBaseVec ) == 0:
22  if len( tagBase ) != 0:
23  from CondTools.L1TriggerExt.L1UniformTagsExt_cfi import initL1UniformTagsExt
24  initL1UniformTagsExt( tagBase )
25  tagBaseVec = initL1UniformTagsExt.tagBaseVec
26  else:
27  from CondTools.L1TriggerExt.L1O2OTagsExt_cfi import initL1O2OTagsExt
29  tagBaseVec = initL1O2OTagsExt.tagBaseVec
30 
31  from CondCore.CondDB.CondDB_cfi import CondDB
32  CondDB.connect = cms.string(inputDBConnect)
33 
34  process.l1conddb = cms.ESSource("PoolDBESSource",
35  CondDB,
36  toGet = cms.VPSet(cms.PSet(
37  record = cms.string('L1TriggerKeyListExtRcd'),
38  tag = cms.string('L1TriggerKeyListExt_' + tagBaseVec[ L1CondEnumExt.L1TriggerKeyListExt ])
39  ),
40  cms.PSet(
41  record = cms.string('L1TriggerKeyExtRcd'),
42  tag = cms.string('L1TriggerKeyExt_' + tagBaseVec[ L1CondEnumExt.L1TriggerKeyExt ])
43  ))
44  )
45  process.l1conddb.DBParameters.authenticationPath = inputDBAuth
46 
47  # The more records, the longer it takes PoolDBESSource to initialize, so be
48  # selective if possible.
49 
50  if includeAllTags == True:
51  from CondTools.L1TriggerExt.L1SubsystemParamsExt_cfi import initL1SubsystemsExt
52  initL1SubsystemsExt( tagBaseVec = tagBaseVec )
53  process.l1conddb.toGet.extend(initL1SubsystemsExt.params.recordInfo)
54  elif includeRSTags == True:
55  from CondTools.L1TriggerExt.L1RSSubsystemParamsExt_cfi import initL1RSSubsystemsExt
56  initL1RSSubsystemsExt( tagBaseVec = tagBaseVec )
57  process.l1conddb.toGet.extend(initL1RSSubsystemsExt.params.recordInfo)
58 
59  if applyESPrefer == True:
60  process.es_prefer_l1conddb = cms.ESPrefer("PoolDBESSource","l1conddb")