1 import FWCore.ParameterSet.Config
as cms
2 import FWCore.ParameterSet.VarParsing
as VarParsing
6 options.register(
'popconConfigFileName',
8 VarParsing.VarParsing.multiplicity.singleton,
9 VarParsing.VarParsing.varType.string,
10 "PopCon config file name")
12 options.parseArguments()
17 for k,v
in md.records().
items():
18 psetForRec.append( cms.PSet( record = cms.string(str(k)),
19 tag = cms.string(str(v.get(
'destinationTag'))),
24 for k,v
in md.records().
items():
25 outRec = v.get(
'outputRecord')
28 sqliteTag = v.get(
'sqliteTag')
30 sqliteTag = v.get(
'destinationTag')
31 psetForOutRec.append( cms.PSet( record = cms.string(str( outRec )),
32 tag = cms.string(str( sqliteTag )),
33 timetype = cms.untracked.string(str(v.get(
'timetype')))
37 destinationDatabase = md.destinationDatabase()
40 process = cms.Process(
"PopCon")
41 process.load(
"CondCore.CondDB.CondDB_cfi")
42 process.CondDB.DBParameters.messageLevel = cms.untracked.int32( 3 )
43 process.CondDB.connect =
'sqlite:%s' %popcon2dropbox.dbFileForDropBox
45 process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
47 toPut = cms.VPSet( psetForOutRec )
50 process.source = cms.Source(
"EmptyIOVSource",
51 timetype = cms.string(
'runnumber'),
52 firstValue = cms.uint64(1),
53 lastValue = cms.uint64(1),
54 interval = cms.uint64(1)