Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:30

0001 #
0002 # $Id$
0003 # Author Stefano Argiro
0004 #
0005 # Extract histos from EDM root file
0006 #
0007 # Usage:
0008 # cmsRun edm2me_cfg.py files=file:file.root
0009 #
0010 # Todo: specify output file name from command line
0011 #
0012 
0013 import FWCore.ParameterSet.Config as cms
0014 import FWCore.ParameterSet.VarParsing as VarParsing
0015 
0016 
0017 process = cms.Process("EDMtoMEConvert")
0018 process.load("DQMServices.Components.EDMtoMEConverter_cff")
0019 
0020 # setup 'standard'  options
0021 options = VarParsing.VarParsing ('standard')
0022 options.maxEvents = -1 # -1 means all events
0023 
0024 # get and parse the command line arguments
0025 options.parseArguments()
0026 
0027 # Use the options
0028 
0029 process.source = cms.Source ("PoolSource",
0030                               fileNames = cms.untracked.vstring (options.files)
0031                              )
0032                                                           
0033 process.maxEvents = cms.untracked.PSet(
0034         input = cms.untracked.int32 (options.maxEvents)
0035         )
0036 
0037 
0038 process.maxEvents = cms.untracked.PSet(
0039         input = cms.untracked.int32(-1)
0040         )
0041 
0042                            
0043 
0044 process.p = cms.Path(process.EDMtoMEConverter*process.dqmSaver)
0045 process.EDMtoMEConverter.Verbosity = 1
0046 process.EDMtoMEConverter.Frequency = 1
0047 process.dqmSaver.convention = 'Offline'
0048 process.dqmSaver.workflow = '/A/B/C'