Go to the documentation of this file.00001 import FWCore.ParameterSet.VarParsing as VarParsing
00002
00003 ivars = VarParsing.VarParsing('standard')
00004
00005 ivars.register ('outputTag',
00006 mult=ivars.multiplicity.singleton,
00007 mytype=ivars.varType.string,
00008 info="for testing")
00009 ivars.outputTag="demo"
00010
00011 ivars.register ('inputFile',
00012 mult=ivars.multiplicity.singleton,
00013 mytype=ivars.varType.string,
00014 info="for testing")
00015
00016 ivars.register ('outputFile',
00017 mult=ivars.multiplicity.singleton,
00018 mytype=ivars.varType.string,
00019 info="for testing")
00020
00021 ivars.inputFile="./input.root"
00022 ivars.outputFile="./output.db"
00023
00024 ivars.parseArguments()
00025
00026 import FWCore.ParameterSet.Config as cms
00027
00028 process = cms.Process('DUMMY')
00029
00030 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))
00031 process.source = cms.Source("EmptyIOVSource",
00032 timetype = cms.string("runnumber"),
00033 firstValue = cms.uint64(1),
00034 lastValue = cms.uint64(200),
00035 interval = cms.uint64(1)
00036 )
00037
00038 process.load("CondCore.DBCommon.CondDBCommon_cfi")
00039 process.CondDBCommon.connect = "sqlite_file:" + ivars.outputFile
00040
00041 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
00042 process.CondDBCommon,
00043 timetype = cms.untracked.string("runnumber"),
00044 toPut = cms.VPSet(cms.PSet(record = cms.string('HeavyIonRcd'),
00045 tag = cms.string(ivars.outputTag)
00046 )
00047 )
00048 )
00049
00050 process.makeCentralityTableDB = cms.EDAnalyzer('CentralityTableProducer',
00051 makeDBFromTFile = cms.untracked.bool(True),
00052 inputTFile = cms.string(ivars.inputFile),
00053 rootTag = cms.string(ivars.outputTag)
00054 )
00055
00056 process.step = cms.Path(process.makeCentralityTableDB)
00057
00058
00059
00060
00061