Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-24 01:11:28

0001 import FWCore.ParameterSet.Config as cms
0002 from FWCore.ParameterSet.VarParsing import VarParsing
0003 
0004 
0005 ## VarParsing object
0006 
0007 options = VarParsing('python')
0008 
0009 options.register('globaltag', '121X_mcRun3_2021_realistic_v15', VarParsing.multiplicity.singleton, VarParsing.varType.string, 'Set Global Tag')
0010 options.register('name', 'TEST', VarParsing.multiplicity.singleton, VarParsing.varType.string, 'Set process name')
0011 
0012 options.parseArguments()
0013 
0014 
0015 ## Process
0016 
0017 process = cms.Process('HARVESTING')
0018 
0019 # import of standard configurations
0020 process.load('Configuration.StandardSequences.Harvesting_cff')
0021 process.load('Configuration.StandardSequences.EDMtoMEAtRunEnd_cff')
0022 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0023 
0024 ## global tag
0025 process.GlobalTag.globaltag = cms.string(options.globaltag)
0026 
0027 ## input file 
0028 process.source = cms.Source("PoolSource",
0029     fileNames = cms.untracked.vstring(options.inputFiles),
0030     processingMode = cms.untracked.string('RunsAndLumis')
0031 )
0032 
0033 ## number of events
0034 process.maxEvents = cms.untracked.PSet(
0035     input = cms.untracked.int32(-1)
0036 )
0037 
0038 ## output options
0039 process.options = cms.untracked.PSet(
0040     Rethrow  = cms.untracked.vstring('ProductNotFound'),
0041     fileMode = cms.untracked.string('FULLMERGE')
0042 )
0043 
0044 ## DQMStore and output configuration
0045 #process.DQMStore.collateHistograms        = True
0046 process.EDMtoMEConverter.convertOnEndLumi = True
0047 process.EDMtoMEConverter.convertOnEndRun  = True
0048 process.dqmSaver.saveByRun      = -1
0049 process.dqmSaver.saveAtJobEnd   = True
0050 process.dqmSaver.forceRunNumber = 1
0051 process.dqmSaver.workflow       = '/Physics/Exotica/' + options.name ## adapt appropriately
0052 
0053 
0054 ## path definitions
0055 process.edmtome = cms.Path(
0056     process.EDMtoME
0057 )
0058 process.dqmsave = cms.Path(
0059     process.DQMSaver
0060 )
0061 
0062 ## schedule definition
0063 process.schedule = cms.Schedule(process.edmtome,process.dqmsave)