CMS 3D CMS Logo

copyEcalPFRecHitThresholdsFromFile_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process("TEST")
4 process.load("CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetriever_cfi")
5 process.EcalTrivialConditionRetriever.producedEcalPFRecHitThresholds = cms.untracked.bool(True)
6 process.EcalTrivialConditionRetriever.EcalPFRecHitThresholdsEB = cms.untracked.double( 0.0)
7 process.EcalTrivialConditionRetriever.EcalPFRecHitThresholdsEE = cms.untracked.double( 0.0)
8 process.EcalTrivialConditionRetriever.PFRecHitFile = cms.untracked.string("EB_thresholds_-1.txt")
9 process.EcalTrivialConditionRetriever.PFRecHitFileEE = cms.untracked.string("EE_thresholds_-1.txt")
10 
11 
12 process.load("CondCore.CondDB.CondDB_cfi")
13 #process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_31X_ECAL'
14 #process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb'
15 process.CondDB.connect = 'sqlite_file:DB.db'
16 
17 process.MessageLogger = cms.Service("MessageLogger",
18  debugModules = cms.untracked.vstring('*'),
19  destinations = cms.untracked.vstring('cout')
20 )
21 
22 process.source = cms.Source("EmptyIOVSource",
23  firstValue = cms.uint64(1),
24  lastValue = cms.uint64(1),
25  timetype = cms.string('runnumber'),
26  interval = cms.uint64(1)
27 )
28 
29 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
30  process.CondDB,
31  toPut = cms.VPSet(
32  cms.PSet(
33  record = cms.string('EcalPFRecHitThresholdsRcd'),
34  tag = cms.string('EcalPFRecHitThresholds_2018_def_mc')
35  )
36  )
37 )
38 
39 process.dbCopy = cms.EDAnalyzer("EcalDBCopy",
40  timetype = cms.string('runnumber'),
41  toCopy = cms.VPSet(
42  cms.PSet(
43  record = cms.string('EcalPFRecHitThresholdsRcd'),
44  container = cms.string('EcalPFRecHitThresholds')
45  )
46  )
47 )
48 
49 process.prod = cms.EDAnalyzer("EcalTrivialObjectAnalyzer")
50 
51 process.p = cms.Path(process.prod*process.dbCopy)