CMS 3D CMS Logo

copySimComponentShapeFromFiles_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.producedEcalSimComponentShape = cms.untracked.bool(True)
6 process.EcalTrivialConditionRetriever.getSimComponentShapeFromFile = cms.untracked.bool(True)
7 
8 
9 
10 process.EcalTrivialConditionRetriever.sim_component_shape_TI = cms.untracked.double(1)
11 process.EcalTrivialConditionRetriever.sim_component_shape_EB_thresh = cms.double(0.00013)
12 fileNames = [f"EB_SimComponentShape_PhaseI_depth{i}.txt" for i in range(0,23)]
13 #fileNames = [f"EB_SimComponentShape_PhaseII_depth{i}.txt" for i in range(0,23)]
14 process.EcalTrivialConditionRetriever.EBSimComponentShapeFiles = cms.untracked.vstring(fileNames)
15 
16 
17 process.load("CondCore.CondDB.CondDB_cfi")
18 #process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_31X_ECAL'
19 #process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb'
20 process.CondDB.connect = 'sqlite_file:EBSimComponentShape_PhaseI.db'
21 #process.CondDB.connect = 'sqlite_file:EBSimComponentShape_PhaseII.db'
22 
23 process.MessageLogger = cms.Service("MessageLogger",
24  cerr = cms.untracked.PSet(
25  enable = cms.untracked.bool(False)
26  ),
27  cout = cms.untracked.PSet(
28  enable = cms.untracked.bool(True)
29  ),
30  debugModules = cms.untracked.vstring('*')
31 )
32 
33 process.source = cms.Source("EmptyIOVSource",
34  firstValue = cms.uint64(1),
35  lastValue = cms.uint64(1),
36  timetype = cms.string('runnumber'),
37  interval = cms.uint64(1)
38 )
39 
40 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
41  process.CondDB,
42  toPut = cms.VPSet(
43  cms.PSet(
44  record = cms.string('EcalSimComponentShapeRcd'),
45  tag = cms.string('EcalSimComponentShape_PhaseI')
46  #tag = cms.string('EcalSimComponentShape_PhaseII')
47  )
48  )
49 )
50 
51 process.dbCopy = cms.EDAnalyzer("EcalDBCopy",
52  timetype = cms.string('runnumber'),
53  toCopy = cms.VPSet(
54  cms.PSet(
55  record = cms.string('EcalSimComponentShapeRcd'),
56  container = cms.string('EcalSimComponentShape')
57  )
58  )
59 )
60 
61 process.prod = cms.EDAnalyzer("EcalTrivialObjectAnalyzer")
62 
63 process.p = cms.Path(process.prod*process.dbCopy)