Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:26

0001 database = "sqlite_file:fftjet_corr.db"
0002 sequenceTag = "PF0"
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 from JetMETCorrections.FFTJetModules.fftjetcorrectionesproducer_cfi import *
0006 
0007 process = cms.Process('FFTJetCorrectorDBWrite') 
0008 
0009 process.source = cms.Source('EmptySource') 
0010 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1)) 
0011 
0012 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0013 process.CondDBCommon.connect = database
0014 
0015 # Data is tagged in the database by the "tag" parameter specified in the
0016 # PoolDBOutputService configuration. We then check if the tag already exists.
0017 #
0018 # -- If the tag does not exist, a new interval of validity (IOV) for this tag
0019 #    is created, valid till "end of time".
0020 #
0021 # -- If the tag already exists: the IOV of the previous data is stopped at
0022 #    "current time" and we register new data valid from now on (currentTime
0023 #    is the time of the current event!). 
0024 #
0025 # The "record" parameter should be the same in the PoolDBOutputService
0026 # configuration and in the module which writes the object. It is basically
0027 # used in order to just associate the record with the tag.
0028 #
0029 process.PoolDBOutputService = cms.Service(
0030     "PoolDBOutputService",
0031     process.CondDBCommon,
0032     timetype = cms.untracked.string('runnumber'),
0033     toPut = cms.VPSet(cms.PSet(
0034         record = cms.string(fftjet_corr_types[sequenceTag].dbRecord),
0035         tag = cms.string(fftjet_corr_types[sequenceTag].dbTag)
0036     ))
0037 )
0038 
0039 process.writer = cms.EDAnalyzer(
0040     'FFTJetCorrectorDBWriter',
0041     inputFile = cms.string("fftjet_corr.gssa"),
0042     record = cms.string(fftjet_corr_types[sequenceTag].dbRecord)
0043 )
0044 
0045 process.p = cms.Path(process.writer)