CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlCa.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 """
3 _AlCa_
4 
5 Scenario supporting proton collisions
6 
7 """
8 
9 import os
10 import sys
11 
13 from Configuration.DataProcessing.Utils import stepALCAPRODUCER,dqmIOSource,harvestingMode,dictIO
14 import FWCore.ParameterSet.Config as cms
15 
16 class AlCa(Scenario):
17  """
18  _AlCa_
19 
20  Implement configuration building for data processing for proton
21  collision data taking
22 
23  """
24 
25  def skimsIfNotGiven(self,args,sl):
26  if not 'skims' in args:
27  args['skims']=sl
28 
29  def promptReco(self, globalTag, **args):
30  if not 'skims' in args:
31  args['skims']=self.skims
32  step = stepALCAPRODUCER(args['skims'])
33  options = Options()
34  options.__dict__.update(defaultOptions.__dict__)
35  options.scenario = "pp"
36  options.step = step
37  dictIO(options,args)
38  options.conditions = globalTag
39 
40  process = cms.Process('RECO')
41  cb = ConfigBuilder(options, process = process, with_output = True)
42 
43  # Input source
44  process.source = cms.Source("PoolSource",
45  fileNames = cms.untracked.vstring()
46  )
47  cb.prepare()
48 
49  return process
50 
51  def alcaSkim(self, skims, **args):
52  """
53  _alcaSkim_
54 
55  AlcaReco processing & skims for proton collisions
56 
57  """
58  options = Options()
59  options.__dict__.update(defaultOptions.__dict__)
60  options.scenario = "pp"
61  options.step = "ALCAOUTPUT:"+('+'.join(skims))
62  options.conditions = args['globaltag'] if 'globaltag' in args else 'None'
63  options.triggerResultsProcess = 'RECO'
64 
65  process = cms.Process('ALCA')
66  cb = ConfigBuilder(options, process = process)
67 
68  # Input source
69  process.source = cms.Source(
70  "PoolSource",
71  fileNames = cms.untracked.vstring()
72  )
73 
74  cb.prepare()
75 
76  return process
77 
78 
79  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
80  """
81  _dqmHarvesting_
82 
83  Proton collisions data taking DQM Harvesting
84 
85  """
86  options = defaultOptions
87  options.scenario = "pp"
88  options.step = "HARVESTING:alcaHarvesting"
89  options.name = "EDMtoMEConvert"
90  options.conditions = globalTag
91 
92  process = cms.Process("HARVESTING")
93  process.source = dqmIOSource(args)
94  configBuilder = ConfigBuilder(options, process = process)
95  configBuilder.prepare()
96 
97  #
98  # customise process for particular job
99  #
100  #process.source.processingMode = cms.untracked.string('RunsAndLumis')
101  #process.source.fileNames = cms.untracked(cms.vstring())
102  #process.maxEvents.input = -1
103  #process.dqmSaver.workflow = datasetName
104  #process.dqmSaver.saveByLumiSection = 1
105  #if args.has_key('referenceFile') and args.get('referenceFile', ''):
106  # process.DQMStore.referenceFileName = \
107  # cms.untracked.string(args['referenceFile'])
108  harvestingMode(process,datasetName,args)
109 
110  return process
def promptReco
Definition: AlCa.py:29
def stepALCAPRODUCER
Definition: Utils.py:9
def dqmHarvesting
Definition: AlCa.py:79
def alcaSkim
Definition: AlCa.py:51
def dqmIOSource
Definition: Utils.py:88
def dictIO
Definition: Utils.py:108
def skimsIfNotGiven
Definition: AlCa.py:25
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def harvestingMode
Definition: Utils.py:99