CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
prodmc.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 """
3 _prodmc_
4 
5 Scenario supporting 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 
19 
21  """
22  _prodmc_
23 
24  Implement configuration building for MC production
25 
26  """
27 
28  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
29  """
30  _dqmHarvesting_
31 
32  DQM Harvesting for MC production
33 
34  """
35  options = defaultOptions
36  options.scenario = "pp"
37  options.step = "HARVESTING:validationprodHarvesting"
38  options.isMC = True
39  options.isData = False
40  options.beamspot = None
41  options.eventcontent = None
42  options.name = "EDMtoMEConvert"
43  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
44  options.arguments = ""
45  options.evt_type = ""
46  options.filein = []
47 
48  process = cms.Process("HARVESTING")
49  if args.get('newDQMIO', False):
50  process.source = cms.Source("DQMRootSource")
51  else:
52  process.source = cms.Source("PoolSource")
53  configBuilder = ConfigBuilder(options, process = process)
54  configBuilder.prepare()
55 
56  #
57  # customise process for particular job
58  #
59  process.source.processingMode = cms.untracked.string('RunsAndLumis')
60  process.source.fileNames = cms.untracked(cms.vstring())
61  process.maxEvents.input = -1
62  process.dqmSaver.workflow = datasetName
63  if args.has_key('referenceFile') and args.get('referenceFile', ''):
64  process.DQMStore.referenceFileName = \
65  cms.untracked.string(args['referenceFile'])
66 
67  return process