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  cerr = cms.untracked.PSet(
19  enable = cms.untracked.bool(False)
20  ),
21  cout = cms.untracked.PSet(
22  enable = cms.untracked.bool(True)
23  ),
24  debugModules = cms.untracked.vstring('*')
25 )
26 
27 process.source = cms.Source("EmptyIOVSource",
28  firstValue = cms.uint64(1),
29  lastValue = cms.uint64(1),
30  timetype = cms.string('runnumber'),
31  interval = cms.uint64(1)
32 )
33 
34 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
35  process.CondDB,
36  toPut = cms.VPSet(
37  cms.PSet(
38  record = cms.string('EcalPFRecHitThresholdsRcd'),
39  tag = cms.string('EcalPFRecHitThresholds_2018_def_mc')
40  )
41  )
42 )
43 
44 process.dbCopy = cms.EDAnalyzer("EcalDBCopy",
45  timetype = cms.string('runnumber'),
46  toCopy = cms.VPSet(
47  cms.PSet(
48  record = cms.string('EcalPFRecHitThresholdsRcd'),
49  container = cms.string('EcalPFRecHitThresholds')
50  )
51  )
52 )
53 
54 process.prod = cms.EDAnalyzer("EcalTrivialObjectAnalyzer")
55 
56 process.p = cms.Path(process.prod*process.dbCopy)