CMS 3D CMS Logo

EcalIntercalibConstantsPopConBTransitionAnalyzer_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from CondCore.CondDB.CondDB_cfi import *
3 import CondTools.Ecal.conddb_init as conddb_init
4 
5 process = cms.Process("EcalIntercalibConstantsPopulator")
6 
7 process.MessageLogger = cms.Service("MessageLogger",
8  destinations = cms.untracked.vstring("cout"),
9  cout = cms.untracked.PSet(threshold = cms.untracked.string("INFO"))
10  )
11 
12 process.source = cms.Source("EmptyIOVSource",
13  lastValue = cms.uint64(conddb_init.options.runNumber),
14  timetype = cms.string('runnumber'),
15  firstValue = cms.uint64(conddb_init.options.runNumber),
16  interval = cms.uint64(1)
17 )
18 
19 CondDBConnection = CondDB.clone(connect = cms.string(conddb_init.options.destinationDatabase))
20 
21 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
22  CondDBConnection,
23  toPut = cms.VPSet(cms.PSet(record = cms.string("EcalIntercalibConstantsRcd"),
24  tag = cms.string(conddb_init.options.destinationTag)
25  )
26  )
27  )
28 
29 process.popConEcalIntercalibConstants = cms.EDAnalyzer("EcalIntercalibConstantsPopConBTransitionAnalyzer",
30  SinceAppendMode = cms.bool(True),
31  record = cms.string("EcalIntercalibConstantsRcd"),
32  Source = cms.PSet(BTransition = cms.PSet(CondDBConnection, #We write and read from the same DB
33  runNumber = cms.uint64(conddb_init.options.runNumber),
34  tagForRunInfo = cms.string(conddb_init.options.tagForRunInfo),
35  tagForBOff = cms.string(conddb_init.options.tagForBOff),
36  tagForBOn = cms.string(conddb_init.options.tagForBOn),
37  currentThreshold = cms.untracked.double(conddb_init.options.currentThreshold)
38  )
39  ),
40  loggingOn = cms.untracked.bool(True),
41  targetDBConnectionString = cms.untracked.string("")
42  )
43 
44 process.p = cms.Path(process.popConEcalIntercalibConstants)