Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:36

0001 #! /usr/bin/env python
0002 
0003 r'''
0004 cmsRun Configuration file that skims the data from the reconstructed events.
0005 It is very general and allows to set in the metaconfig the parameters for the skimming.
0006 '''
0007 from __future__ import print_function
0008 
0009 import FWCore.ParameterSet.Config as cms
0010 # The meta configuration: 3 parameters
0011 import metaconfig
0012 print('metaconfig.__dict__=%s'%metaconfig.__dict__)
0013 
0014 # The cff and cfi management
0015 import fragments
0016 
0017 process=cms.Process('RECOSIM') #The object that stores the configuration for cmsRun
0018 
0019 includes_list=['FWCore/MessageLogger/data/MessageLogger.cfi',
0020                'Configuration/EventContent/data/EventContent.cff']
0021 
0022 for el in fragments.include(includes_list):
0023     process.extend(el)
0024     
0025     
0026 process.maxEvents=cms.untracked.PSet(input=cms.untracked.int32(metaconfig.nevts)) 
0027 
0028 process.source=cms.Source('PoolSource',
0029                           fileNames=cms.untracked.vstring('file:%s' %metaconfig.infile))
0030 
0031 # We use a feature of python to make general the content of the skimmed data..
0032 exec('custom_outputCommands=process.%s.outputCommands\n'%metaconfig.outputCommands)
0033 
0034 process.OutModule=cms.OutputModule('PoolOutputModule',
0035                                    fileName=cms.untracked.string('%s' %metaconfig.outfile),
0036                                    outputCommands=custom_outputCommands)
0037 
0038 process.printEventNumber=cms.OutputModule('AsciiOutputModule') 
0039 
0040 process.out=cms.EndPath(process.OutModule+process.printEventNumber)                                                       
0041