CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/Configuration/DataProcessing/python/Impl/prodmc.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 """
00003 _prodmc_
00004 
00005 Scenario supporting MC production
00006 
00007 """
00008 
00009 import os
00010 import sys
00011 
00012 from Configuration.DataProcessing.Scenario import Scenario
00013 import FWCore.ParameterSet.Config as cms
00014 from Configuration.PyReleaseValidation.ConfigBuilder import ConfigBuilder
00015 from Configuration.PyReleaseValidation.ConfigBuilder import Options
00016 from Configuration.PyReleaseValidation.ConfigBuilder import defaultOptions
00017 
00018 
00019 
00020 class prodmc(Scenario):
00021     """
00022     _prodmc_
00023 
00024     Implement configuration building for MC production 
00025 
00026     """
00027 
00028     def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
00029         """
00030         _dqmHarvesting_
00031 
00032         DQM Harvesting for MC production
00033 
00034         """
00035         options = defaultOptions
00036         options.scenario = "pp"
00037         options.step = "HARVESTING:validationprodHarvesting"
00038         options.isMC = True
00039         options.isData = False
00040         options.beamspot = None
00041         options.eventcontent = None
00042         options.name = "EDMtoMEConvert"
00043         options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
00044         options.arguments = ""
00045         options.evt_type = ""
00046         options.filein = []
00047  
00048         process = cms.Process("HARVESTING")
00049         if args.get('newDQMIO', False):
00050             process.source = cms.Source("DQMRootSource")
00051         else:
00052             process.source = cms.Source("PoolSource")
00053         configBuilder = ConfigBuilder(options, process = process)
00054         configBuilder.prepare()
00055 
00056         #
00057         # customise process for particular job
00058         #
00059         process.source.processingMode = cms.untracked.string('RunsAndLumis')
00060         process.source.fileNames = cms.untracked(cms.vstring())
00061         process.maxEvents.input = -1
00062         process.dqmSaver.workflow = datasetName
00063         if args.has_key('referenceFile') and args.get('referenceFile', ''):
00064             process.DQMStore.referenceFileName = \
00065                                 cms.untracked.string(args['referenceFile'])
00066         
00067         return process