1 import FWCore.ParameterSet.Config
as cms
2 import FWCore.ParameterSet.VarParsing
as VarParsing
6 options.register (
'input',
7 'EcalTPGWeightIdMap.txt',
8 VarParsing.VarParsing.multiplicity.singleton,
9 VarParsing.VarParsing.varType.string,
11 options.register (
'output',
12 'EcalTPGWeightIdMap.db',
13 VarParsing.VarParsing.multiplicity.singleton,
14 VarParsing.VarParsing.varType.string,
16 options.register (
'filetype',
18 VarParsing.VarParsing.multiplicity.singleton,
19 VarParsing.VarParsing.varType.string,
21 options.register(
'outputtag',
23 VarParsing.VarParsing.multiplicity.singleton,
24 VarParsing.VarParsing.varType.string,
26 options.parseArguments()
28 process = cms.Process(
"ProcessOne")
30 process.MessageLogger = cms.Service(
"MessageLogger",
31 cerr = cms.untracked.PSet(
32 enable = cms.untracked.bool(
False)
34 cout = cms.untracked.PSet(
35 enable = cms.untracked.bool(
True),
36 threshold = cms.untracked.string(
'DEBUG')
38 debugModules = cms.untracked.vstring(
'*')
41 process.source = cms.Source(
"EmptyIOVSource",
42 lastValue = cms.uint64(100000000000),
43 timetype = cms.string(
'runnumber'),
44 firstValue = cms.uint64(100000000000),
45 interval = cms.uint64(1)
48 process.load(
"CondCore.CondDB.CondDB_cfi")
50 process.CondDB.connect =
'sqlite_file:%s'%(options.output)
52 process.PoolDBOutputService = cms.Service(
"PoolDBOutputService",
54 logconnect = cms.untracked.string(
'sqlite_file:log.db'),
57 record = cms.string(
'EcalTPGWeightIdMapRcd'),
58 tag = cms.string(options.outputtag)
63 process.Test1 = cms.EDAnalyzer(
"ExTestEcalTPGWeightIdMapAnalyzer",
64 record = cms.string(
'EcalTPGWeightIdMapRcd'),
65 loggingOn= cms.untracked.bool(
True),
66 IsDestDbCheckedInQueryLog=cms.untracked.bool(
True),
67 SinceAppendMode=cms.bool(
True),
69 firstRun = cms.string(
'1'),
70 lastRun = cms.string(
'10'),
71 OnlineDBSID = cms.string(
''),
72 OnlineDBUser = cms.string(
''),
73 OnlineDBPassword = cms.string(
''),
74 LocationSource = cms.string(
''),
75 Location = cms.string(
''),
76 GenTag = cms.string(
''),
77 RunType = cms.string(
''),
78 fileType = cms.string(options.filetype),
79 fileName = cms.string(options.input),
83 process.p = cms.Path(process.Test1)