Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-22 06:26:53

0001 # Config file template to write new/update AlCaRecoTriggerBits stored
0002 # in AlCaRecoTriggerBitsRcd that is used to get selected HLT paths for
0003 # the HLTHighLevel filter for AlCaReco production.
0004 #
0005 # Please understand that there are two IOVs involved:
0006 # 1) One for the output tag. Here the usually used default is 1->inf,
0007 #    changed by process.AlCaRecoTriggerBitsRcdUpdate.firstRunIOV
0008 #    and process.AlCaRecoTriggerBitsRcdUpdate.lastRunIOV.
0009 # 2) The IOV of the tag of the input AlCaRecoTriggerBitsRcd.
0010 #    That is chosen by process.source.firstRun (but irrelevant if 
0011 #    process.AlCaRecoTriggerBitsRcdUpdate.startEmpty = True)
0012 #
0013 # See also further comments below, especially the WARNING.
0014 #
0015 #  Author    : Gero Flucke
0016 #  Date      : February 2009
0017 #  $Revision: 1.3 $
0018 #  $Date: 2009/04/21 14:42:50 $
0019 #  (last update by $Author: flucke $)
0020 
0021 import FWCore.ParameterSet.Config as cms
0022 
0023 process = cms.Process("UPDATEDB")
0024 
0025 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0026 process.MessageLogger.cerr = cms.untracked.PSet(enable = cms.untracked.bool(False))
0027 process.MessageLogger.cout = cms.untracked.PSet(INFO = cms.untracked.PSet(
0028     reportEvery = cms.untracked.int32(1)
0029     ))
0030 
0031 # the module writing to DB
0032 from CondTools.HLT.alCaRecoTriggerBitsRcdUpdate_cfi import alCaRecoTriggerBitsRcdUpdate as _alCaRecoTriggerBitsRcdUpdate
0033 process.AlCaRecoTriggerBitsRcdUpdate = _alCaRecoTriggerBitsRcdUpdate.clone()
0034 # The IOV that you want to write out, defaut is 1 to -1/inf. 
0035 #process.AlCaRecoTriggerBitsRcdUpdate.firstRunIOV = 1 # docu see...
0036 #process.AlCaRecoTriggerBitsRcdUpdate.lastRunIOV = -1 # ...cfi
0037 # If you want to start from scratch, comment the next line:
0038 process.AlCaRecoTriggerBitsRcdUpdate.startEmpty = False
0039 # In case you want to remove 'keys', use this possibly comma separated list.
0040 # Also if you want to replace settings for one 'key', you have to remove it first.
0041 process.AlCaRecoTriggerBitsRcdUpdate.listNamesRemove = ["SiStripCalZeroBias"]
0042 # Here specifiy 'key' and corresponding paths for new entries or updated ones:
0043 process.AlCaRecoTriggerBitsRcdUpdate.triggerListsAdd = [
0044     cms.PSet(listName = cms.string('SiStripCalZeroBias'), # to be updated
0045              hltPaths = cms.vstring('HLT_ZeroBias','RandomPath')),
0046     cms.PSet(listName = cms.string('NewAlCaReco'),        # to be added
0047              hltPaths = cms.vstring('HLT_path1','HLT_path2', 'HLT_path3')),
0048     cms.PSet(listName = cms.string('NewAlCaRecoEmpty'),   # to be added
0049              hltPaths = cms.vstring())
0050     ]
0051 
0052 # Here specify the 'keys' to be replaced 
0053 process.AlCaRecoTriggerBitsRcdUpdate.alcarecoToReplace = []
0054 
0055 # No data, but have to specify run number if you do not want 1, see below:
0056 process.source = cms.Source("EmptySource",
0057                             #numberEventsInRun = cms.untracked.uint32(1),
0058                             #firstRun = cms.untracked.uint32(1) # 1 is default
0059                             )
0060 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0061 
0062 # DB input - needed only for AlCaRecoTriggerBitsRcdUpdate.startEmpty = False
0063 # WARNING:
0064 # Take care in case the input tag has several IOVs: The run number that will be 
0065 # used to define which payload you get is defined by the run number in the
0066 # EmptySource above!
0067 # Either a global tag...
0068 #process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0069 # process.GlobalTag.globaltag = "90X_dataRun2_Express_v0" # may choose non-default tag
0070 # ...or (recommended since simpler) directly from DB/sqlite
0071 
0072 process.load("CondCore.CondDB.CondDB_cfi")
0073 
0074 # from local sqlite file
0075 #process.CondDB.connect = 'sqlite_file:AlCaRecoTriggerBits.db'
0076 # from conditons Database
0077 process.CondDB.connect = 'frontier://FrontierProd/CMS_CONDITIONS'
0078  
0079 process.dbInput = cms.ESSource(
0080     "PoolDBESSource",
0081     process.CondDB,
0082     toGet = cms.VPSet(cms.PSet(record = cms.string('AlCaRecoTriggerBitsRcd'),
0083                                # tag = cms.string('TestTag') # choose tag to update
0084                                tag = cms.string('AlCaRecoHLTpaths8e29_1e31_v7_hlt')
0085                                )
0086                       )
0087     )
0088 
0089 # DB output service:
0090 process.CondDB.connect = 'sqlite_file:AlCaRecoTriggerBits.db'
0091 #process.CondDB.connect = 'sqlite_file:AlCaRecoTriggerBitsUpdate.db'
0092 
0093 process.PoolDBOutputService = cms.Service(
0094     "PoolDBOutputService",
0095     process.CondDB,
0096     timetype = cms.untracked.string('runnumber'),
0097     toPut = cms.VPSet(cms.PSet(record = cms.string('AlCaRecoTriggerBitsRcd'),
0098                                tag = cms.string('TestTag') # choose output tag you want
0099                                )
0100                       )
0101     )
0102 
0103 # Put module in path:
0104 process.p = cms.Path(process.AlCaRecoTriggerBitsRcdUpdate)
0105 
0106