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  # write alignments, APEs, and surface deformations to DB by default
14  # --------------------------------------------------------------------------
15  process.AlignmentProducer.saveToDB = True
16  process.AlignmentProducer.saveApeToDB = True
17  process.AlignmentProducer.saveDeformationsToDB = True
18 
19  # setup database output module
20  # --------------------------------------------------------------------------
21  from CondCore.CondDB.CondDB_cfi import CondDB
22  process.PoolDBOutputService = cms.Service("PoolDBOutputService",
23  CondDB,
24  timetype = cms.untracked.string("runnumber"),
25  toPut = cms.VPSet(
26  cms.PSet(
27  record = cms.string("TrackerAlignmentRcd"),
28  tag = cms.string("Alignments")),
29  cms.PSet(
30  record = cms.string("TrackerAlignmentErrorExtendedRcd"),
31  tag = cms.string("AlignmentErrorsExtended")),
32  cms.PSet(
33  record = cms.string("TrackerSurfaceDeformationRcd"),
34  tag = cms.string("Deformations")),
35  cms.PSet(
36  record = cms.string("SiStripLorentzAngleRcd_peak"),
37  tag = cms.string("SiStripLorentzAngle_peak")),
38  cms.PSet(
39  record = cms.string("SiStripLorentzAngleRcd_deco"),
40  tag = cms.string("SiStripLorentzAngle_deco")),
41  cms.PSet(
42  record = cms.string("SiPixelLorentzAngleRcd"),
43  tag = cms.string("SiPixelLorentzAngle")),
44  cms.PSet(
45  record = cms.string("SiStripBackPlaneCorrectionRcd"),
46  tag = cms.string("SiStripBackPlaneCorrection"))
47  )
48  )
49  process.PoolDBOutputService.connect = "sqlite_file:alignments_MP.db"
50 
51 
52  # Reconfigure parts of the algorithm configuration
53  # --------------------------------------------------------------------------
54  process.AlignmentProducer.algoConfig.mergeBinaryFiles = binary_files
55  process.AlignmentProducer.algoConfig.mergeTreeFiles = tree_files
56 
57 
58  # Set a new source and path.
59  # --------------------------------------------------------------------------
60  process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
61  process.source = cms.Source("EmptySource")
62  process.dump = cms.EDAnalyzer("EventContentAnalyzer")
63  process.p = cms.Path(process.dump)
def setup
Definition: PedeSetup.py:4