1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
database = "sqlite_file:compatOOTPileupCorrection.db"
tag = "test"
inputfile = "testOOTPileupCorrection.bbin"
import FWCore.ParameterSet.Config as cms
process = cms.Process('OOTPileupCompatibilityDBWrite')
process.source = cms.Source('EmptySource')
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
process.load("CondCore.CondDB.CondDB_cfi")
process.CondDB.connect = database
# Data is tagged in the database by the "tag" parameter specified in the
# PoolDBOutputService configuration. We then check if the tag already exists.
#
# -- If the tag does not exist, a new interval of validity (IOV) for this tag
# is created, valid till "end of time".
#
# -- If the tag already exists: the IOV of the previous data is stopped at
# "current time" and we register new data valid from now on (currentTime
# is the time of the current event!).
#
# The "record" parameter should be the same in the PoolDBOutputService
# configuration and in the module which writes the object. It is basically
# used in order to just associate the record with the tag.
#
process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
process.CondDB,
timetype = cms.untracked.string('runnumber'),
toPut = cms.VPSet(cms.PSet(
record = cms.string("HcalOOTPileupCompatibilityRcd"),
tag = cms.string(tag)
))
)
process.filereader = cms.EDAnalyzer(
'BufferedBoostIODBWriter',
inputFile = cms.string(inputfile),
record = cms.string("HcalOOTPileupCompatibilityRcd")
)
process.p = cms.Path(process.filereader)
|