1 import FWCore.ParameterSet.Config
as cms
8 if hasattr(process,
'HLTSchedule'):
9 if process.schedule_() !=
None:
10 raise Exception(
'process.schedule already exists')
11 process.setSchedule_(process.HLTSchedule)
12 del process.HLTSchedule
14 if (_customInfo
is not None):
16 _maxEvents = _customInfo[
'maxEvents']
17 _globalTag = _customInfo[
'globalTag']
18 _inputFile = _customInfo[
'inputFile']
19 _realData = _customInfo[
'realData']
21 import FWCore.ParameterSet.VarParsing
as VarParsing
24 cmsRunOptions.maxEvents = _maxEvents
25 cmsRunOptions.register(
'globalTag',_globalTag,cmsRunOptions.multiplicity.singleton,cmsRunOptions.varType.string,
"GlobalTag")
26 cmsRunOptions.inputFiles = _inputFile
27 cmsRunOptions.register(
'realData',_realData,cmsRunOptions.multiplicity.singleton,cmsRunOptions.varType.bool,
"Real Data?")
29 cmsRunOptions.parseArguments()
34 _maxEvents = cmsRunOptions.maxEvents
35 _globalTag = cmsRunOptions.globalTag
36 _inputFile = cmsRunOptions.inputFiles
37 _realData = cmsRunOptions.realData
41 _maxEvents = cms.untracked.int32( _maxEvents )
42 if hasattr(process,
'maxEvents'):
43 process.maxEvents.input = _maxEvents
45 process.maxEvents = cms.untracked.PSet( input = _maxEvents )
49 _globalTag = _customInfo[
'globalTags'][_realData]
51 if hasattr(process,
'GlobalTag'):
52 from Configuration.AlCa.GlobalTag
import GlobalTag
53 process.GlobalTag =
GlobalTag(process.GlobalTag, _globalTag,
'')
57 if _inputFile[0] ==
"@":
58 _inputFile[0] = _customInfo[
'inputFiles'][_realData]
60 if hasattr(process,
'source'):
61 process.source.fileNames = cms.untracked.vstring( _inputFile )
65 if menuType ==
"HIon":
67 from HLTrigger.Configuration.CustomConfigs
import MassReplaceInputTag
68 process = MassReplaceInputTag(process,
"rawDataRepacker",
"rawDataCollector")
71 from HLTrigger.Configuration.customizeHLTforMC
import customizeHLTforMC
73 if menuType ==
"HIon":
74 from HLTrigger.Configuration.CustomConfigs
import MassReplaceInputTag
75 process = MassReplaceInputTag(process,
"rawDataRepacker",
"rawDataCollector")