CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PedeSetup.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 def setup(process, binary_files, tree_files):
5  """Pede-specific setup.
6 
7  Arguments:
8  - `process`: cms.Process object
9  - `binary_files`: list of binary files to be read by pede
10  - `tree_files`: list of ROOT files created in the mille step
11  """
12 
13  # enforce that alignment record is written to DB
14  # --------------------------------------------------------------------------
15  process.AlignmentProducer.saveToDB = True
16 
17  # setup database output module
18  # --------------------------------------------------------------------------
19  from CondCore.CondDB.CondDB_cfi import CondDB
20  process.PoolDBOutputService = cms.Service("PoolDBOutputService",
21  CondDB,
22  timetype = cms.untracked.string("runnumber"),
23  toPut = cms.VPSet(
24  cms.PSet(
25  record = cms.string("TrackerAlignmentRcd"),
26  tag = cms.string("Alignments")),
27  cms.PSet(
28  record = cms.string("TrackerAlignmentErrorExtendedRcd"),
29  tag = cms.string("AlignmentErrorsExtended")),
30  cms.PSet(
31  record = cms.string("TrackerSurfaceDeformationRcd"),
32  tag = cms.string("Deformations")),
33  cms.PSet(
34  record = cms.string("SiStripLorentzAngleRcd_peak"),
35  tag = cms.string("SiStripLorentzAngle_peak")),
36  cms.PSet(
37  record = cms.string("SiStripLorentzAngleRcd_deco"),
38  tag = cms.string("SiStripLorentzAngle_deco")),
39  cms.PSet(
40  record = cms.string("SiPixelLorentzAngleRcd"),
41  tag = cms.string("SiPixelLorentzAngle")),
42  cms.PSet(
43  record = cms.string("SiStripBackPlaneCorrectionRcd"),
44  tag = cms.string("SiStripBackPlaneCorrection"))
45  )
46  )
47  process.PoolDBOutputService.connect = "sqlite_file:alignments_MP.db"
48 
49 
50  # Reconfigure parts of the algorithm configuration
51  # --------------------------------------------------------------------------
52  process.AlignmentProducer.algoConfig.mergeBinaryFiles = binary_files
53  process.AlignmentProducer.algoConfig.mergeTreeFiles = tree_files
54 
55 
56  # Set a new source and path.
57  # --------------------------------------------------------------------------
58  process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
59  process.source = cms.Source("EmptySource")
60  process.dump = cms.EDAnalyzer("EventContentAnalyzer")
61  process.p = cms.Path(process.dump)
def setup
Definition: PedeSetup.py:4