CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlCaTestEnable.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 """
3 _AlCaTestEnable_
4 
5 Scenario supporting proton collisions
6 
7 """
8 
9 import os
10 import sys
11 
12 from Configuration.DataProcessing.Scenario import Scenario
13 from Configuration.DataProcessing.Utils import stepALCAPRODUCER
14 import FWCore.ParameterSet.Config as cms
15 from Configuration.PyReleaseValidation.ConfigBuilder import ConfigBuilder
16 from Configuration.PyReleaseValidation.ConfigBuilder import Options
17 from Configuration.PyReleaseValidation.ConfigBuilder import defaultOptions
18 from Configuration.PyReleaseValidation.ConfigBuilder import installFilteredStream
19 from Configuration.DataProcessing.RecoTLR import customisePrompt,customiseExpress
20 
22  """
23  _AlCaTestEnable_
24 
25  Implement configuration building for data processing for proton
26  collision data taking
27 
28  """
29 
30 
31  def promptReco(self, globalTag, writeTiers = ['ALCARECO'], **args):
32  """
33  _promptReco_
34 
35  Proton collision data taking prompt reco
36 
37  """
38 
39  skims = ['TkAlLAS']
40  step = stepALCAPRODUCER(skims)
41  options = Options()
42  options.__dict__.update(defaultOptions.__dict__)
43  options.scenario = "pp"
44  options.step = step
45  options.isMC = False
46  options.isData = True
47  options.beamspot = None
48  options.eventcontent = ','.join(writeTiers)
49  options.datatier = ','.join(writeTiers)
50  options.magField = 'AutoFromDBCurrent'
51  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
52  options.relval = False
53 
54  process = cms.Process('RECO')
55  cb = ConfigBuilder(options, process = process, with_output = True)
56 
57  # Input source
58  process.source = cms.Source("PoolSource",
59  fileNames = cms.untracked.vstring()
60  )
61  cb.prepare()
62 
63  #add the former top level patches here
64  # customisePrompt(process)
65 
66  return process
67 
68 
69  def expressProcessing(self, globalTag, writeTiers = [], **args):
70  """
71  _expressProcessing_
72 
73  Proton collision data taking express processing
74 
75  """
76 
77  skims = ['TkAlLAS']
78  step = stepALCAPRODUCER(skims)
79  options = Options()
80  options.__dict__.update(defaultOptions.__dict__)
81  options.scenario = "pp"
82  options.step = step
83  options.isMC = False
84  options.isData = True
85  options.beamspot = None
86  options.eventcontent = ','.join(writeTiers)
87  options.datatier = ','.join(writeTiers)
88  options.magField = 'AutoFromDBCurrent'
89  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
90  options.relval = False
91 
92  process = cms.Process('RECO')
93  cb = ConfigBuilder(options, process = process, with_output = True)
94 
95  # Input source
96  process.source = cms.Source("PoolSource",
97  fileNames = cms.untracked.vstring()
98  )
99  cb.prepare()
100 
101  #add the former top level patches here
102  customisePrompt(process)
103 
104  return process
105 
106 
107  def alcaSkim(self, skims, **args):
108  """
109  _alcaSkim_
110 
111  AlcaReco processing & skims for proton collisions
112 
113  """
114 
115  globalTag = None
116  if 'globaltag' in args:
117  globalTag = args['globaltag']
118 
119  step = "ALCAOUTPUT:"
120  for skim in skims:
121  step += (skim+"+")
122  options = Options()
123  options.__dict__.update(defaultOptions.__dict__)
124  options.scenario = "pp"
125  options.step = step.rstrip('+')
126  options.isMC = False
127  options.isData = True
128  options.beamspot = None
129  options.eventcontent = None
130  options.relval = None
131  if globalTag != None :
132  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
133  options.triggerResultsProcess = 'RECO'
134 
135  process = cms.Process('ALCA')
136  cb = ConfigBuilder(options, process = process)
137 
138  # Input source
139  process.source = cms.Source(
140  "PoolSource",
141  fileNames = cms.untracked.vstring()
142  )
143 
144  cb.prepare()
145 
146  return process
147 
148 
149  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
150  """
151  _dqmHarvesting_
152 
153  Proton collisions data taking DQM Harvesting
154 
155  """
156  options = defaultOptions
157  options.scenario = "pp"
158  options.step = "HARVESTING:alcaHarvesting"
159  options.isMC = False
160  options.isData = True
161  options.beamspot = None
162  options.eventcontent = None
163  options.name = "EDMtoMEConvert"
164  options.conditions = "FrontierConditions_GlobalTag,%s" % globalTag
165  options.arguments = ""
166  options.evt_type = ""
167  options.filein = []
168 
169  process = cms.Process("HARVESTING")
170  process.source = cms.Source("PoolSource")
171  configBuilder = ConfigBuilder(options, process = process)
172  configBuilder.prepare()
173 
174  #
175  # customise process for particular job
176  #
177  process.source.processingMode = cms.untracked.string('RunsAndLumis')
178  process.source.fileNames = cms.untracked(cms.vstring())
179  process.maxEvents.input = -1
180  process.dqmSaver.workflow = datasetName
181  process.dqmSaver.saveByLumiSection = 1
182  if args.has_key('referenceFile') and args.get('referenceFile', ''):
183  process.DQMStore.referenceFileName = \
184  cms.untracked.string(args['referenceFile'])
185 
186  return process
def stepALCAPRODUCER
Definition: Utils.py:9
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def customisePrompt
Definition: RecoTLR.py:74