Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-28 23:10:44

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 
0008 import FWCore.ParameterSet.Config as cms
0009 # The meta configuration: 3 parameters
0010 import metaconfig
0011 print('metaconfig.__dict__=%s'%metaconfig.__dict__)
0012 
0013 # The cff and cfi management
0014 import fragments
0015 
0016 process=cms.Process('RECOSIM') #The object that stores the configuration for cmsRun
0017 
0018 includes_list=['FWCore/MessageLogger/data/MessageLogger.cfi',
0019                'Configuration/EventContent/data/EventContent.cff']
0020 
0021 for el in fragments.include(includes_list):
0022     process.extend(el)
0023     
0024     
0025 process.maxEvents=cms.untracked.PSet(input=cms.untracked.int32(metaconfig.nevts)) 
0026 
0027 process.source=cms.Source('PoolSource',
0028                           fileNames=cms.untracked.vstring('file:%s' %metaconfig.infile))
0029 
0030 # We use a feature of python to make general the content of the skimmed data..
0031 exec('custom_outputCommands=process.%s.outputCommands\n'%metaconfig.outputCommands)
0032 
0033 process.OutModule=cms.OutputModule('PoolOutputModule',
0034                                    fileName=cms.untracked.string('%s' %metaconfig.outfile),
0035                                    outputCommands=custom_outputCommands)
0036 
0037 process.printEventNumber=cms.OutputModule('AsciiOutputModule') 
0038 
0039 process.out=cms.EndPath(process.OutModule+process.printEventNumber)                                                       
0040