test
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  """
17  _Test_
18 
19  Test Scenario
20 
21  """
22 
23 
24  def promptReco(self, globalTag):
25  """
26  _promptReco_
27 
28  Returns skeleton process object
29 
30  """
31  return cms.Process("RECO")
32 
33 
34  def expressProcessing(self, globalTag):
35  """
36  _expressProcessing_
37 
38  Returns skeleton process object
39 
40  """
41  return cms.Process("Express")
42 
43 
44  def alcaSkim(self, skims):
45  """
46  _alcaSkim_
47 
48  Returns skeleton process object
49 
50  """
51  return cms.Process("ALCARECO")
52 
53 
54  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
55  """
56  _dqmHarvesting_
57 
58  build a DQM Harvesting configuration
59 
60  this method can be used to test an extra scenario, all the
61  ConfigBuilder options can be overwritten by using **args. This will be
62  useful for testing with real jobs.
63 
64  Arguments:
65 
66  datasetName - aka workflow name for DQMServer, this is the name of the
67  dataset containing the harvested run
68  runNumber - The run being harvested
69  globalTag - The global tag being used
70  inputFiles - The list of LFNs being harvested
71 
72  """
73  options = defaultOptions
74  options.scenario = "cosmics"
75  options.step = "HARVESTING:dqmHarvesting"
76  options.isMC = False
77  options.isData = True
78  options.beamspot = None
79  options.eventcontent = None
80  options.name = "EDMtoMEConvert"
81  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
82  options.arguments = ""
83  options.evt_type = ""
84  options.filein = []
85 
86  options.__dict__.update(args)
87 
88  process = cms.Process("HARVESTING")
89  process.source = cms.Source("PoolSource")
90  configBuilder = ConfigBuilder(options, process = process)
91  configBuilder.prepare()
92 
93  #
94  # customise process for particular job
95  #
96  process.source.processingMode = cms.untracked.string('RunsAndLumis')
97  process.source.fileNames = cms.untracked(cms.vstring())
98  process.maxEvents.input = -1
99  process.dqmSaver.workflow = datasetName
100  if args.has_key('saveByLumiSection') and \
101  args.get('saveByLumiSection', ''):
102  process.dqmSaver.saveByLumiSection = int(args['saveByLumiSection'])
103  if args.has_key('referenceFile') and args.get('referenceFile', ''):
104  process.DQMStore.referenceFileName = \
105  cms.untracked.string(args['referenceFile'])
106 
107  return process
108 
109 
110  def skimming(self, *skims):
111  """
112  _skimming_
113 
114  Returns skeleton process object
115 
116  """
117  return cms.Process("Skimming")
def expressProcessing
Definition: Test.py:34
def dqmHarvesting
Definition: Test.py:54
def alcaSkim
Definition: Test.py:44
def skimming
Definition: Test.py:110
def promptReco
Definition: Test.py:24