CMS 3D CMS Logo

L1CondDBSource_cff.py
Go to the documentation of this file.
1 # Default behavior: deliver current L1-O2O tags from Frontier.
2 
3 # IF tagBaseVec is empty then
4 # IF tagBaseVec is given, use uniform tags with the given tagBase
5 # ELSE use current L1-O2O tags
6 
7 # If tagBase AND tagBaseVec are both given, then tagBaseVec trumps tagBase.
8 
9 def initCondDBSource( process,
10  inputDBConnect = 'frontier://FrontierProd/CMS_COND_31X_L1T',
11  inputDBAuth = '.',
12  tagBase = "",
13  tagBaseVec = [],
14  includeAllTags = False,
15  includeRSTags = False,
16  use30XTagList = False,
17  applyESPrefer = True ):
18  import FWCore.ParameterSet.Config as cms
19  from CondCore.DBCommon.CondDBSetup_cfi import CondDBSetup
20  from CondTools.L1Trigger.L1CondEnum_cfi import L1CondEnum
21 
22  if len( tagBaseVec ) == 0:
23  if len( tagBase ) != 0:
24  from CondTools.L1Trigger.L1UniformTags_cfi import initL1UniformTags
25  initL1UniformTags( tagBase )
26  tagBaseVec = initL1UniformTags.tagBaseVec
27  else:
28  from CondTools.L1Trigger.L1O2OTags_cfi import initL1O2OTags
30  tagBaseVec = initL1O2OTags.tagBaseVec
31 
32  process.l1conddb = cms.ESSource("PoolDBESSource",
33  CondDBSetup,
34  connect = cms.string(inputDBConnect),
35  toGet = cms.VPSet(cms.PSet(
36  record = cms.string('L1TriggerKeyListRcd'),
37  tag = cms.string('L1TriggerKeyList_' + tagBaseVec[ L1CondEnum.L1TriggerKeyList ])
38  ),
39  cms.PSet(
40  record = cms.string('L1TriggerKeyRcd'),
41  tag = cms.string('L1TriggerKey_' + tagBaseVec[ L1CondEnum.L1TriggerKey ])
42  ))
43  )
44  process.l1conddb.DBParameters.authenticationPath = inputDBAuth
45 
46  # The more records, the longer it takes PoolDBESSource to initialize, so be
47  # selective if possible.
48 
49  if includeAllTags == True:
50  if use30XTagList == True:
51  from CondTools.L1Trigger.L1SubsystemParams30X_cfi import initL1Subsystems
52  else:
53  from CondTools.L1Trigger.L1SubsystemParams_cfi import initL1Subsystems
54  initL1Subsystems( tagBaseVec = tagBaseVec )
55  process.l1conddb.toGet.extend(initL1Subsystems.params.recordInfo)
56  elif includeRSTags == True:
57  from CondTools.L1Trigger.L1RSSubsystemParams_cfi import initL1RSSubsystems
58  initL1RSSubsystems( tagBaseVec = tagBaseVec )
59  process.l1conddb.toGet.extend(initL1RSSubsystems.params.recordInfo)
60 
61  if applyESPrefer == True:
62  process.es_prefer_l1conddb = cms.ESPrefer("PoolDBESSource","l1conddb")
L1UniformTags_cfi.initL1UniformTags
def initL1UniformTags(tagBase="IDEAL")
Definition: L1UniformTags_cfi.py:1
L1SubsystemParams30X_cfi.initL1Subsystems
def initL1Subsystems(tagBaseVec=[], objectKey='dummy')
Definition: L1SubsystemParams30X_cfi.py:1
L1RSSubsystemParams_cfi.initL1RSSubsystems
def initL1RSSubsystems(tagBaseVec=[], L1MuDTTFMasksRcdKey='dummy', L1MuGMTChannelMaskRcdKey='dummy', L1RCTChannelMaskRcdKey='dummy', L1RCTNoisyChannelMaskRcdKey='dummy', L1GctChannelMaskRcdKey='dummy', L1GtPrescaleFactorsAlgoTrigRcdKey='dummy', L1GtPrescaleFactorsTechTrigRcdKey='dummy', L1GtTriggerMaskAlgoTrigRcdKey='dummy', L1GtTriggerMaskTechTrigRcdKey='dummy', L1GtTriggerMaskVetoTechTrigRcdKey='dummy', includeL1RCTNoisyChannelMask=True)
Definition: L1RSSubsystemParams_cfi.py:1
L1O2OTags_cfi.initL1O2OTags
def initL1O2OTags()
Definition: L1O2OTags_cfi.py:1
CondDBSetup_cfi
L1CondDBSource_cff.initCondDBSource
def initCondDBSource(process, inputDBConnect='frontier://FrontierProd/CMS_COND_31X_L1T', inputDBAuth='.', tagBase="", tagBaseVec=[], includeAllTags=False, includeRSTags=False, use30XTagList=False, applyESPrefer=True)
Definition: L1CondDBSource_cff.py:9