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.GeometryIdeal_cff")
20 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
21 from Configuration.AlCa.GlobalTag import GlobalTag
22 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup')
23 process.load("Configuration.StandardSequences.MagneticField_cff")
24 
25 ## Output Module Configuration (expects a path 'p')
26 from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
27 process.out = cms.OutputModule("PoolOutputModule",
28  fileName = cms.untracked.string('patTuple.root'),
29  ## save only events passing the full path
30  #SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('p') ),
31  ## save PAT output; you need a '*' to unpack the list of commands
32  ## 'patEventContent'
33  outputCommands = cms.untracked.vstring('drop *', *patEventContentNoCleaning )
34  )
35 
36 process.outpath = cms.EndPath(process.out)