CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Test.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 """
3 _Test_
4 
5 Test Scenario implementation for unittests/development purposes
6 
7 Not for use with data taking
8 
9 """
10 
11 
12 from Configuration.DataProcessing.Scenario import Scenario
13 import FWCore.ParameterSet.Config as cms
14 
15 class Test(Scenario):
16  def __init__(self):
17  Scenario.__init__(self)
18  """
19  _Test_
20 
21  Test Scenario
22 
23  """
24 
25 
26  def promptReco(self, globalTag):
27  """
28  _promptReco_
29 
30  Returns skeleton process object
31 
32  """
33  return cms.Process("RECO", self.eras)
34 
35 
36  def expressProcessing(self, globalTag):
37  """
38  _expressProcessing_
39 
40  Returns skeleton process object
41 
42  """
43  return cms.Process("Express", self.eras)
44 
45 
46  def alcaSkim(self, skims):
47  """
48  _alcaSkim_
49 
50  Returns skeleton process object
51 
52  """
53  return cms.Process("ALCARECO", self.eras)
54 
55 
56  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
57  """
58  _dqmHarvesting_
59 
60  build a DQM Harvesting configuration
61 
62  this method can be used to test an extra scenario, all the
63  ConfigBuilder options can be overwritten by using **args. This will be
64  useful for testing with real jobs.
65 
66  Arguments:
67 
68  datasetName - aka workflow name for DQMServer, this is the name of the
69  dataset containing the harvested run
70  runNumber - The run being harvested
71  globalTag - The global tag being used
72  inputFiles - The list of LFNs being harvested
73 
74  """
75  options = defaultOptions
76  options.scenario = "cosmics"
77  options.step = "HARVESTING:dqmHarvesting"
78  options.isMC = False
79  options.isData = True
80  options.beamspot = None
81  options.eventcontent = None
82  options.name = "EDMtoMEConvert"
83  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
84  options.arguments = ""
85  options.evt_type = ""
86  options.filein = []
87 
88  options.__dict__.update(args)
89 
90  process = cms.Process("HARVESTING", self.eras)
91  process.source = cms.Source("PoolSource")
92  configBuilder = ConfigBuilder(options, process = process)
93  configBuilder.prepare()
94 
95  #
96  # customise process for particular job
97  #
98  process.source.processingMode = cms.untracked.string('RunsAndLumis')
99  process.source.fileNames = cms.untracked(cms.vstring())
100  process.maxEvents.input = -1
101  process.dqmSaver.workflow = datasetName
102  if 'saveByLumiSection' in args and \
103  args.get('saveByLumiSection', ''):
104  process.dqmSaver.saveByLumiSection = int(args['saveByLumiSection'])
105  if 'referenceFile' in args and args.get('referenceFile', ''):
106  process.DQMStore.referenceFileName = \
107  cms.untracked.string(args['referenceFile'])
108 
109  return process
110 
111 
112  def skimming(self, *skims):
113  """
114  _skimming_
115 
116  Returns skeleton process object
117 
118  """
119  return cms.Process("Skimming", self.eras)
def expressProcessing
Definition: Test.py:36
def dqmHarvesting
Definition: Test.py:56
def alcaSkim
Definition: Test.py:46
def skimming
Definition: Test.py:112
def __init__
Definition: Test.py:16
def promptReco
Definition: Test.py:26