Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:05

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ## CLI parser
0004 import argparse
0005 import sys
0006 
0007 parser = argparse.ArgumentParser(
0008     prog = 'cmsRun '+sys.argv[0]+' --',
0009     description = 'Configuration file to run the DQMFileSaver on DQMIO input files.',
0010     formatter_class = argparse.ArgumentDefaultsHelpFormatter
0011 )
0012 
0013 parser.add_argument('-t', '--nThreads', type = int, help = 'Number of threads',
0014                     default = 4)
0015 
0016 parser.add_argument('-s', '--nStreams', type = int, help = 'Number of EDM streams',
0017                     default = 0)
0018 
0019 parser.add_argument('-i', '--inputFiles', nargs = '+', help = 'List of DQMIO input files',
0020                     default = ['file:testHLTFiltersDQMonitor_DQMIO.root'])
0021 
0022 args = parser.parse_args()
0023 
0024 # Process
0025 process = cms.Process('HARVESTING')
0026 
0027 process.options.numberOfThreads = args.nThreads
0028 process.options.numberOfStreams = args.nStreams
0029 process.options.numberOfConcurrentLuminosityBlocks = 1
0030 
0031 # Source (DQM input)
0032 process.source = cms.Source('DQMRootSource',
0033   fileNames = cms.untracked.vstring(args.inputFiles)
0034 )
0035 
0036 # DQMStore (Service)
0037 process.load('DQMServices.Core.DQMStore_cfi')
0038 
0039 # MessageLogger (Service)
0040 process.load('FWCore.MessageLogger.MessageLogger_cfi')
0041 
0042 # Output module (file in ROOT format)
0043 from DQMServices.Components.DQMFileSaver_cfi import dqmSaver as _dqmSaver
0044 process.dqmSaver = _dqmSaver.clone(
0045   workflow = '/DQMOffline/Trigger/'+process.name_()
0046 )
0047 
0048 # EndPath
0049 process.endp = cms.EndPath(
0050   process.dqmSaver
0051 )