2 import FWCore.ParameterSet.Config
as cms
3 from FWCore.ParameterSet.VarParsing
import VarParsing
7 options.register(
'runN', 1,
8 VarParsing.multiplicity.singleton,
9 VarParsing.varType.int,
13 options.parseArguments()
15 if (
not options.tag
or not options.inputFiles):
16 raise ValueError(
'usage: cmsRun SiStripApvGainReader_cfg.py inputFiles=my_input_file tag=my_tag')
17 process = cms.Process(
"SiStripApvGainReader")
19 process.MessageLogger = cms.Service(
21 debugModules = cms.untracked.vstring(
''),
22 threshold = cms.untracked.string(
'INFO'),
23 destinations = cms.untracked.vstring(
'SiStripApvGainReader.log')
30 process.source = cms.Source(
"EmptySource",
31 numberEventsInRun = cms.untracked.uint32(1),
32 firstRun = cms.untracked.uint32(options.runN)
35 process.maxEvents = cms.untracked.PSet(
36 input = cms.untracked.int32(1)
43 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
44 from Configuration.AlCa.GlobalTag
import GlobalTag
46 process.GlobalTag =
GlobalTag(process.GlobalTag,
'auto:run2_data',
'')
53 process.poolDBESSource = cms.ESSource(
"PoolDBESSource",
55 connect = cms.string(options.inputFiles[0]),
56 toGet = cms.VPSet(cms.PSet(record = cms.string(
'SiStripApvGainRcd'),
57 tag = cms.string(options.tag)
61 process.prefer_poolDBESSource = cms.ESPrefer(
"PoolDBESSource",
"poolDBESSource")
67 process.gainreader = cms.EDAnalyzer(
"SiStripApvGainReader",
68 printDebug = cms.untracked.bool(
True),
69 outputFile = cms.untracked.string(
"SiStripApvGains_dump.txt"),
70 gainType = cms.untracked.uint32(0)
73 process.TFileService = cms.Service(
"TFileService",
74 fileName = cms.string(
"gain.root"),
75 closeFileFast = cms.untracked.bool(
True)
78 process.p1 = cms.Path(process.gainreader)