Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:10

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