1 from __future__
import absolute_import
2 import FWCore.ParameterSet.Config
as cms
3 import FWCore.ParameterSet.VarParsing
as VarParsing
4 from .
import popcon2dropbox
7 options.register(
'targetFile',
9 VarParsing.VarParsing.multiplicity.singleton,
10 VarParsing.VarParsing.varType.string,
11 "the target sqlite file name")
12 options.register(
'destinationDatabase',
14 VarParsing.VarParsing.multiplicity.singleton,
15 VarParsing.VarParsing.varType.string,
16 "the destination database connection string")
17 options.register(
'destinationTag',
19 VarParsing.VarParsing.multiplicity.singleton,
20 VarParsing.VarParsing.varType.string,
21 "the destination tag name")
22 options.parseArguments()
26 psetForOutRec.append( cms.PSet( record = cms.string(
str( recordName )),
27 tag = cms.string(
str( options.destinationTag )),
28 timetype = cms.untracked.string(
str(tagTimeType))
32 sqliteConnect =
'sqlite:%s' %options.targetFile
33 process = cms.Process(
"PopCon")
34 process.load(
"CondCore.CondDB.CondDB_cfi")
35 process.CondDB.DBParameters.messageLevel = cms.untracked.int32( 3 )
37 process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
38 DBParameters = cms.PSet( messageLevel = cms.untracked.int32( 3 ),
40 connect = cms.string( sqliteConnect ),
41 toPut = cms.VPSet( psetForOutRec )
44 process.source = cms.Source(
"EmptyIOVSource",
45 timetype = cms.string(
'runnumber'),
46 firstValue = cms.uint64(1),
47 lastValue = cms.uint64(1),
48 interval = cms.uint64(1)
54 psetForRec.append( cms.PSet( record = cms.string(
str(recordName)),
55 tag = cms.string(
str( options.destinationTag ))