5 Scenario supporting proton collisions 8 from __future__
import print_function
14 from Configuration.DataProcessing.Utils
import stepALCAPRODUCER,dqmIOSource,harvestingMode,dictIO,gtNameAndConnect,addMonitoring
15 import FWCore.ParameterSet.Config
as cms
19 Scenario.__init__(self)
24 Implement configuration building for data processing for proton 30 if not 'skims' in args:
34 if not 'skims' in args:
35 args[
'skims']=self.skims
38 options.__dict__.update(defaultOptions.__dict__)
39 options.scenario =
"pp" 44 process = cms.Process(
'RECO', self.eras)
45 cb =
ConfigBuilder(options, process = process, with_output =
True)
48 process.source = cms.Source(
"PoolSource",
49 fileNames = cms.untracked.vstring()
59 AlcaReco processing & skims for proton collisions 63 pclWflws = [x
for x
in skims
if "PromptCalibProd" in x]
64 skims = [x
for x
in skims
if x
not in pclWflws]
67 step +=
'ALCA:'+(
'+'.
join(pclWflws))
72 step +=
"ALCAOUTPUT:"+(
'+'.
join(skims))
75 options.__dict__.update(defaultOptions.__dict__)
76 options.scenario =
"pp" 78 options.conditions = args[
'globaltag']
if 'globaltag' in args
else 'None' 79 if 'globalTagConnect' in args
and args[
'globalTagConnect'] !=
'':
80 options.conditions +=
','+args[
'globalTagConnect']
82 options.triggerResultsProcess =
'RECO' 84 process = cms.Process(
'ALCA', self.eras)
88 process.source = cms.Source(
90 fileNames=cms.untracked.vstring()
98 methodToCall = getattr(process,
'ALCARECOStream'+wfl)
99 methodToCall.dataset.dataTier = cms.untracked.string(
'ALCAPROMPT')
108 Proton collisions data taking DQM Harvesting 111 options = defaultOptions
112 options.scenario =
"pp" 113 options.step =
"HARVESTING:alcaHarvesting" 114 options.name =
"EDMtoMEConvert" 117 process = cms.Process(
"HARVESTING", self.eras)
120 configBuilder.prepare()
141 Proton collisions data taking AlCa Harvesting 146 skims = args[
'skims']
149 if 'alcapromptdataset' in args:
150 skims.append(
'@'+args[
'alcapromptdataset'])
152 if len(skims) == 0:
return None 153 options = defaultOptions
154 options.scenario = self.cbSc
if hasattr(self,
'cbSc')
else self.__class__.__name__
155 options.step =
"ALCAHARVEST:"+(
'+'.
join(skims))
156 options.name =
"ALCAHARVEST" 159 process = cms.Process(
"ALCAHARVEST", self.eras)
160 process.source = cms.Source(
"PoolSource")
162 if 'customs' in args:
163 options.customisation_file=args[
'customs']
166 configBuilder.prepare()
171 process.source.processingMode = cms.untracked.string(
'RunsAndLumis')
172 process.source.fileNames = cms.untracked(cms.vstring())
173 process.maxEvents.input = -1
174 process.dqmSaver.workflow = datasetName
182 Proton collision data taking express processing 187 skims = args[
'skims']
188 pclWkflws = [x
for x
in skims
if "PromptCalibProd" in x]
189 for wfl
in pclWkflws:
193 options.__dict__.update(defaultOptions.__dict__)
194 options.scenario =
"pp" 197 if 'outputs' in args:
199 outputs_Raw = [x
for x
in args[
'outputs']
if x[
'dataTier'] ==
'RAW']
200 outputs_noRaw = [x
for x
in args[
'outputs']
if x[
'dataTier'] !=
'RAW']
201 if len(outputs_Raw) == 1:
202 print(
'RAW data-tier requested')
203 options.outputDefinition = outputs_noRaw.__str__()
208 options.filein =
'tobeoverwritten.xyz' 209 if 'inputSource' in args:
210 options.filetype = args[
'inputSource']
211 process = cms.Process(
'RECO', self.eras)
213 if 'customs' in args:
214 options.customisation_file=args[
'customs']
216 cb =
ConfigBuilder(options, process = process, with_output =
True, with_input =
True)
222 for output
in outputs_Raw:
224 moduleLabel = output[
'moduleLabel']
225 selectEvents = output.get(
'selectEvents',
None)
226 maxSize = output.get(
'maxSize',
None)
228 outputModule = cms.OutputModule(
230 fileName = cms.untracked.string(
"%s.root" % moduleLabel)
233 outputModule.dataset = cms.untracked.PSet(dataTier = cms.untracked.string(
"RAW"))
236 outputModule.maxSize = cms.untracked.int32(maxSize)
238 if selectEvents !=
None:
239 outputModule.SelectEvents = cms.untracked.PSet(
240 SelectEvents = cms.vstring(selectEvents)
242 outputModule.outputCommands = cms.untracked.vstring(
'drop *',
245 setattr(process, moduleLabel, outputModule)
247 setattr(process, moduleLabel+
'_step', cms.EndPath(outputModule))
248 path = getattr(process, moduleLabel+
'_step')
249 process.schedule.append(path)
def harvestingMode(process, datasetName, args, rANDl=True)
def expressProcessing(self, globalTag, args)
def gtNameAndConnect(globalTag, args)
def dqmHarvesting(self, datasetName, runNumber, globalTag, args)
S & print(S &os, JobReport::InputFile const &f)
def dictIO(options, args)
def skimsIfNotGiven(self, args, sl)
def promptReco(self, globalTag, args)
def addMonitoring(process)
def alcaSkim(self, skims, args)
def stepALCAPRODUCER(skims)
static std::string join(char **cmd)
def alcaHarvesting(self, globalTag, datasetName, args)