1 import FWCore.ParameterSet.Config
as cms
2 import FWCore.ParameterSet.VarParsing
as VarParsing
6 options.register(
'destinationDatabase',
8 VarParsing.VarParsing.multiplicity.singleton,
9 VarParsing.VarParsing.varType.string,
10 "the destination database connection string")
11 options.register(
'destinationTag',
13 VarParsing.VarParsing.multiplicity.singleton,
14 VarParsing.VarParsing.varType.string,
15 "the destination tag name")
16 options.parseArguments()
20 psetForOutRec.append( cms.PSet( record = cms.string(
str( recordName )),
21 tag = cms.string(
str( options.destinationTag )),
22 timetype = cms.untracked.string(
str(tagTimeType))
26 sqliteConnect =
'sqlite:%s' %popcon2dropbox.dbFileForDropBox
27 process = cms.Process(
"PopCon")
28 process.load(
"CondCore.CondDB.CondDB_cfi")
29 process.CondDB.DBParameters.messageLevel = cms.untracked.int32( 3 )
32 process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
33 DBParameters = cms.PSet( messageLevel = cms.untracked.int32( 3 ),
35 connect = cms.string( sqliteConnect ),
36 toPut = cms.VPSet( psetForOutRec )
39 process.source = cms.Source(
"EmptyIOVSource",
40 timetype = cms.string(
'runnumber'),
41 firstValue = cms.uint64(1),
42 lastValue = cms.uint64(1),
43 interval = cms.uint64(1)
49 psetForRec.append( cms.PSet( record = cms.string(
str(recordName)),
50 tag = cms.string(
str( options.destinationTag ))
def psetForRecord(recordName)
def setup_popcon(recordName, tagTimeType)