3 import FWCore.ParameterSet.Config
as cms
6 raise RuntimeError(
'\nERROR: Need csv-filename as first argument.\n')
8 db_file = csv_file.replace(
'.csv',
'.db')
9 tagger = os.path.basename(csv_file).
split(
'.')[0]
10 print "Using file:", csv_file
11 print "DBout into:", db_file
12 print "taggername:", tagger
14 process = cms.Process(
"BTagCalibCreator")
15 process.load(
"CondCore.DBCommon.CondDBCommon_cfi")
16 process.CondDBCommon.connect =
'sqlite_file:' + db_file
18 process.maxEvents = cms.untracked.PSet(
19 input=cms.untracked.int32(1),
22 process.source = cms.Source(
"EmptySource")
23 process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
27 record = cms.string(tagger),
28 tag = cms.string(tagger),
29 label = cms.string(tagger),
34 process.dbCreator = cms.EDAnalyzer(
"BTagCalibrationDbCreator",
35 csvFile=cms.untracked.string(csv_file),
36 tagger=cms.untracked.string(tagger),