CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
patTemplate_cfg.py
Go to the documentation of this file.
2 
3 process = cms.Process("PAT")
4 
5 ## MessageLogger
6 process.load("FWCore.MessageLogger.MessageLogger_cfi")
7 
8 ## Options and Output Report
9 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
10 
11 ## Source
12 process.source = cms.Source("PoolSource",
13  fileNames = cms.untracked.vstring()
14 )
15 ## Maximal Number of Events
16 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
17 
18 ## Geometry and Detector Conditions (needed for a few patTuple production steps)
19 process.load("Configuration.Geometry.GeometryRecoDB_cff")
20 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff')
21 
22 from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag
23 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc')
24 process.load("Configuration.StandardSequences.MagneticField_cff")
25 
26 ## Output Module Configuration (expects a path 'p')
27 from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
28 process.out = cms.OutputModule("PoolOutputModule",
29  fileName = cms.untracked.string('patTuple.root'),
30  ## save only events passing the full path
31  #SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('p') ),
32  ## save PAT output; you need a '*' to unpack the list of commands
33  ## 'patEventContent'
34  outputCommands = cms.untracked.vstring('drop *', *patEventContentNoCleaning )
35  )
36 
37 process.outpath = cms.EndPath(process.out)