CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
relvalmc.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 """
3 _relvalmc_
4 
5 Scenario supporting RelVal MC production
6 
7 """
8 
9 import os
10 import sys
11 
12 from Configuration.DataProcessing.Scenario import Scenario
13 import FWCore.ParameterSet.Config as cms
14 from Configuration.PyReleaseValidation.ConfigBuilder import ConfigBuilder
15 from Configuration.PyReleaseValidation.ConfigBuilder import Options
16 from Configuration.PyReleaseValidation.ConfigBuilder import defaultOptions
17 
18 
20  """
21  _relvalmc_
22 
23  Implement configuration building for RelVal MC production
24 
25  """
26 
27  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
28  """
29  _dqmHarvesting_
30 
31  DQM Harvesting for RelVal MC production
32 
33  """
34  options = defaultOptions
35  options.scenario = "pp"
36  options.step = "HARVESTING:validationHarvesting+dqmHarvesting"
37  options.isMC = True
38  options.isData = False
39  options.beamspot = None
40  options.eventcontent = None
41  options.name = "EDMtoMEConvert"
42  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
43  options.arguments = ""
44  options.evt_type = ""
45  options.filein = []
46 
47  process = cms.Process("HARVESTING")
48  process.source = cms.Source("PoolSource")
49  configBuilder = ConfigBuilder(options, process = process)
50  configBuilder.prepare()
51 
52  #
53  # customise process for particular job
54  #
55  process.source.processingMode = cms.untracked.string('RunsAndLumis')
56  process.source.fileNames = cms.untracked(cms.vstring())
57  process.maxEvents.input = -1
58  process.dqmSaver.workflow = datasetName
59  if args.has_key('referenceFile') and args.get('referenceFile', ''):
60  process.DQMStore.referenceFileName = \
61  cms.untracked.string(args['referenceFile'])
62 
63  return process