test
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,gtNameAndConnect
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 = gtNameAndConnect(globalTag, args)
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  if args.has_key('globalTagConnect') and args['globalTagConnect'] != '':
64  options.conditions += ','+args['globalTagConnect']
65 
66  options.triggerResultsProcess = 'RECO'
67 
68  process = cms.Process('ALCA')
69  cb = ConfigBuilder(options, process = process)
70 
71  # Input source
72  process.source = cms.Source(
73  "PoolSource",
74  fileNames = cms.untracked.vstring()
75  )
76 
77  cb.prepare()
78 
79  return process
80 
81 
82  def dqmHarvesting(self, datasetName, runNumber, globalTag, **args):
83  """
84  _dqmHarvesting_
85 
86  Proton collisions data taking DQM Harvesting
87 
88  """
89  options = defaultOptions
90  options.scenario = "pp"
91  options.step = "HARVESTING:alcaHarvesting"
92  options.name = "EDMtoMEConvert"
93  options.conditions = gtNameAndConnect(globalTag, args)
94 
95  process = cms.Process("HARVESTING")
96  process.source = dqmIOSource(args)
97  configBuilder = ConfigBuilder(options, process = process)
98  configBuilder.prepare()
99 
100  #
101  # customise process for particular job
102  #
103  #process.source.processingMode = cms.untracked.string('RunsAndLumis')
104  #process.source.fileNames = cms.untracked(cms.vstring())
105  #process.maxEvents.input = -1
106  #process.dqmSaver.workflow = datasetName
107  #process.dqmSaver.saveByLumiSection = 1
108  #if args.has_key('referenceFile') and args.get('referenceFile', ''):
109  # process.DQMStore.referenceFileName = \
110  # cms.untracked.string(args['referenceFile'])
111  harvestingMode(process,datasetName,args)
112 
113  return process
def promptReco
Definition: AlCa.py:29
def stepALCAPRODUCER
Definition: Utils.py:9
def dqmHarvesting
Definition: AlCa.py:82
def alcaSkim
Definition: AlCa.py:51
def gtNameAndConnect
Definition: Utils.py:137
def dqmIOSource
Definition: Utils.py:103
def dictIO
Definition: Utils.py:123
def skimsIfNotGiven
Definition: AlCa.py:25
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def harvestingMode
Definition: Utils.py:114