CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes | Private Attributes
ConfigBuilder.ConfigBuilder Class Reference
Inheritance diagram for ConfigBuilder.ConfigBuilder:

Classes

class  MassSearchReplaceProcessNameVisitor
 

Public Member Functions

def __init__ (self, options, process=None, with_output=False, with_input=False)
 
def addCommon (self)
 
def addConditions (self)
 
def addCustomise (self, unsch=0)
 
def addCustomiseCmdLine (self)
 
def addExtraStream (self, name, stream, workflow='full', cppType="PoolOutputModule")
 
def addMaxEvents (self)
 
def addOutput (self)
 
def addSource (self)
 
def addStandardSequences (self)
 
def build_production_info (self, evt_type, evtnumber)
 
def completeInputCommand (self)
 
def create_process (self)
 
def define_Configs (self)
 
def executeAndRemember (self, command)
 
def expandMapping (self, seqList, mapping, index=None)
 
def finalizeFastSimHLT (self)
 
def load (self, includeFile)
 
def loadAndRemember (self, includeFile)
 
def loadDefaultOrSpecifiedCFF (self, sequence, defaultCFF)
 
def prepare (self, doChecking=False)
 
def prepare_ALCA (self, sequence=None, workflow='full')
 
def prepare_ALCAHARVEST (self, sequence=None)
 
def prepare_ALCAOUTPUT (self, sequence=None)
 
def prepare_ALCAPRODUCER (self, sequence=None)
 
def prepare_CFWRITER (self, sequence=None)
 
def prepare_DATAMIX (self, sequence=None)
 
def prepare_DIGI (self, sequence=None)
 
def prepare_DIGI2RAW (self, sequence=None)
 
def prepare_DQM (self, sequence='DQMOffline')
 
def prepare_EI (self, sequence=None)
 
def prepare_ENDJOB (self, sequence='endOfProcess')
 
def prepare_FILTER (self, sequence=None)
 
def prepare_GEN (self, sequence=None)
 
def prepare_HARVESTING (self, sequence=None)
 
def prepare_HLT (self, sequence=None)
 
def prepare_L1 (self, sequence=None)
 
def prepare_L1HwVal (self, sequence='L1HwVal')
 
def prepare_L1Reco (self, sequence="L1Reco")
 
def prepare_L1REPACK (self, sequence=None)
 
def prepare_L1TrackTrigger (self, sequence="L1TrackTrigger")
 
def prepare_LHE (self, sequence=None)
 
def prepare_NANO (self, sequence="nanoAOD")
 
def prepare_NANOGEN (self, sequence="nanoAOD")
 
def prepare_PAT (self, sequence="miniAOD")
 
def prepare_PATFILTER (self, sequence=None)
 
def prepare_PATGEN (self, sequence="miniGEN")
 
def prepare_POSTRECO (self, sequence=None)
 
def prepare_RAW2DIGI (self, sequence="RawToDigi")
 
def prepare_RAW2RECO (self, sequence=None)
 
def prepare_RECO (self, sequence="reconstruction")
 
def prepare_RECOBEFMIX (self, sequence="reconstruction")
 
def prepare_RECOSIM (self, sequence="recosim")
 
def prepare_REPACK (self, sequence=None)
 
def prepare_SIM (self, sequence=None)
 
def prepare_SKIM (self, sequence="all")
 
def prepare_USER (self, sequence=None)
 
def prepare_VALIDATION (self, sequence='validation')
 
def profileOptions (self)
 
def renameHLTprocessInSequence (self, sequence, proc=None, HLTprocess='HLT')
 
def renameInputTagsInSequence (self, sequence, oldT="rawDataCollector", newT="rawDataRepacker")
 
def scheduleSequence (self, seq, prefix, what='Path')
 
def scheduleSequenceAtEnd (self, seq, prefix)
 

Public Attributes

 addedObjects
 
 additionalCommands
 
 additionalOutputs
 
 ALCADefaultCFF
 
 ALCADefaultSeq
 
 ALCAHARVESTDefaultCFF
 
 ALCAHARVESTDefaultSeq
 
 AlCaPaths
 
 blacklist_paths
 
 CFWRITERDefaultCFF
 
 CFWRITERDefaultSeq
 
 conditionalPaths
 
 ConditionsDefaultCFF
 
 DATAMIXDefaultCFF
 
 DATAMIXDefaultSeq
 
 DIGI2RAWDefaultCFF
 
 DIGI2RAWDefaultSeq
 
 DIGIDefaultCFF
 
 DIGIDefaultSeq
 
 DQMDefaultSeq
 
 DQMOFFLINEDefaultCFF
 
 DQMSaverCFF
 
 EIDefaultCFF
 
 EIDefaultSeq
 
 ENDJOBDefaultCFF
 
 ENDJOBDefaultSeq
 
 EVTCONTDefaultCFF
 
 excludedPaths
 
 GENDefaultCFF
 
 GENDefaultSeq
 
 GeometryCFF
 
 geometryDBLabel
 
 HARVESTINGDefaultCFF
 
 HARVESTINGDefaultSeq
 
 HLTDefaultCFF
 
 HLTDefaultSeq
 
 imports
 
 inliner
 load the relevant part More...
 
 L1DefaultSeq
 
 L1EMDefaultCFF
 
 L1HwValDefaultCFF
 
 L1HwValDefaultSeq
 
 L1MENUDefaultCFF
 
 L1RecoDefaultCFF
 
 L1RecoDefaultSeq
 
 L1REPACKDefaultSeq
 
 L1TrackTriggerDefaultCFF
 
 L1TrackTriggerDefaultSeq
 
 labelsToAssociate
 
 LHEDefaultSeq
 
 magFieldCFF
 
 NANODefaultCFF
 
 NANODefaultSeq
 
 NANOGENDefaultCFF
 
 NANOGENDefaultSeq
 
 nextScheduleIsConditional
 put the filtering path in the schedule More...
 
 PATDefaultCFF
 
 PATDefaultSeq
 
 PATGENDefaultCFF
 
 PATGENDefaultSeq
 
 POSTRECODefaultCFF
 
 POSTRECODefaultSeq
 
 process
 adding standard sequences might change the inputEventContent option and therefore needs to be finalized after More...
 
 productionFilterSequence
 put it before all the other paths More...
 
 pythonCfgCode
 
 RAW2DIGIDefaultCFF
 
 RAW2DIGIDefaultSeq
 
 RAW2RECODefaultSeq
 
 RECOBEFMIXDefaultCFF
 
 RECOBEFMIXDefaultSeq
 
 RECODefaultCFF
 
 RECODefaultSeq
 
 RECOSIMDefaultCFF
 
 RECOSIMDefaultSeq
 
 REDIGIDefaultSeq
 
 REPACKDefaultCFF
 
 REPACKDefaultSeq
 
 runsAndWeights
 drop LHEXMLStringProduct on input to save memory if appropriate More...
 
 runsAndWeightsInt
 
 schedule
 
 SIMDefaultCFF
 
 SIMDefaultSeq
 
 SimGeometryCFF
 
 SKIMDefaultCFF
 
 stepKeys
 
 stepMap
 
 USERDefaultCFF
 
 USERDefaultSeq
 
 VALIDATIONDefaultCFF
 
 VALIDATIONDefaultSeq
 
 with_input
 
 with_output
 

Private Attributes

 _options
 

Detailed Description

The main building routines 

Definition at line 195 of file ConfigBuilder.py.

Constructor & Destructor Documentation

◆ __init__()

def ConfigBuilder.ConfigBuilder.__init__ (   self,
  options,
  process = None,
  with_output = False,
  with_input = False 
)
options taken from old cmsDriver and optparse 

Definition at line 198 of file ConfigBuilder.py.

198  def __init__(self, options, process = None, with_output = False, with_input = False ):
199  """options taken from old cmsDriver and optparse """
200 
201  options.outfile_name = options.dirout+options.fileout
202 
203  self._options = options
204 
205  if self._options.isData and options.isMC:
206  raise Exception("ERROR: You may specify only --data or --mc, not both")
207  #if not self._options.conditions:
208  # raise Exception("ERROR: No conditions given!\nPlease specify conditions. E.g. via --conditions=IDEAL_30X::All")
209 
210  # check that MEtoEDMConverter (running in ENDJOB) and DQMIO don't run in the same job
211  if 'ENDJOB' in self._options.step:
212  if (hasattr(self._options,"outputDefinition") and \
213  self._options.outputDefinition != '' and \
214  any(anyOf(['t','tier','dataTier'],outdic) == 'DQMIO' for outdic in eval(self._options.outputDefinition))) or \
215  (hasattr(self._options,"datatier") and \
216  self._options.datatier and \
217  'DQMIO' in self._options.datatier):
218  print("removing ENDJOB from steps since not compatible with DQMIO dataTier")
219  self._options.step=self._options.step.replace(',ENDJOB','')
220 
221 
222 
223  # what steps are provided by this class?
224  stepList = [re.sub(r'^prepare_', '', methodName) for methodName in ConfigBuilder.__dict__ if methodName.startswith('prepare_')]
225  self.stepMap={}
226  self.stepKeys=[]
227  for step in self._options.step.split(","):
228  if step=='': continue
229  stepParts = step.split(":")
230  stepName = stepParts[0]
231  if stepName not in stepList and not stepName.startswith('re'):
232  raise ValueError("Step "+stepName+" unknown")
233  if len(stepParts)==1:
234  self.stepMap[stepName]=""
235  elif len(stepParts)==2:
236  self.stepMap[stepName]=stepParts[1].split('+')
237  elif len(stepParts)==3:
238  self.stepMap[stepName]=(stepParts[2].split('+'),stepParts[1])
239  else:
240  raise ValueError("Step definition "+step+" invalid")
241  self.stepKeys.append(stepName)
242 
243  #print "map of steps is:",self.stepMap
244 
245  self.with_output = with_output
246  self.process=process
247 
248  if hasattr(self._options,"no_output_flag") and self._options.no_output_flag:
249  self.with_output = False
250  self.with_input = with_input
251  self.imports = []
252  self.create_process()
253  self.define_Configs()
254  self.schedule = list()
255 
256  # we are doing three things here:
257  # creating a process to catch errors
258  # building the code to re-create the process
259 
260  self.additionalCommands = []
261  # TODO: maybe a list of to be dumped objects would help as well
262  self.blacklist_paths = []
263  self.addedObjects = []
264  self.additionalOutputs = {}
265 
266  self.productionFilterSequence = None
267  self.labelsToAssociate=[]
268  self.nextScheduleIsConditional=False
269  self.conditionalPaths=[]
270  self.excludedPaths=[]
271 

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

Member Function Documentation

◆ addCommon()

def ConfigBuilder.ConfigBuilder.addCommon (   self)

Definition at line 339 of file ConfigBuilder.py.

339  def addCommon(self):
340  if 'HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys():
341  self.process.options.Rethrow = ['ProductNotFound']
342  self.process.options.fileMode = 'FULLMERGE'
343 
344  self.addedObjects.append(("","options"))
345 
346  if self._options.lazy_download:
347  self.process.AdaptorConfig = cms.Service("AdaptorConfig",
348  stats = cms.untracked.bool(True),
349  enable = cms.untracked.bool(True),
350  cacheHint = cms.untracked.string("lazy-download"),
351  readHint = cms.untracked.string("read-ahead-buffered")
352  )
353  self.addedObjects.append(("Setup lazy download","AdaptorConfig"))
354 
355  #self.process.cmsDriverCommand = cms.untracked.PSet( command=cms.untracked.string('cmsDriver.py '+self._options.arguments) )
356  #self.addedObjects.append(("what cmsDriver command was used","cmsDriverCommand"))
357 
358  if self._options.profile:
359  (start, interval, eventFormat, jobFormat)=self.profileOptions()
360  self.process.IgProfService = cms.Service("IgProfService",
361  reportFirstEvent = cms.untracked.int32(start),
362  reportEventInterval = cms.untracked.int32(interval),
363  reportToFileAtPostEvent = cms.untracked.string("| gzip -c > %s"%(eventFormat)),
364  reportToFileAtPostEndJob = cms.untracked.string("| gzip -c > %s"%(jobFormat)))
365  self.addedObjects.append(("Setup IGProf Service for profiling","IgProfService"))
366 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addedObjects, mps_setup.append, relativeConstraints.keys, DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.profileOptions(), and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ addConditions()

def ConfigBuilder.ConfigBuilder.addConditions (   self)
Add conditions to the process

Definition at line 835 of file ConfigBuilder.py.

835  def addConditions(self):
836  """Add conditions to the process"""
837  if not self._options.conditions: return
838 
839  if 'FrontierConditions_GlobalTag' in self._options.conditions:
840  print('using FrontierConditions_GlobalTag in --conditions is not necessary anymore and will be deprecated soon. please update your command line')
841  self._options.conditions = self._options.conditions.replace("FrontierConditions_GlobalTag,",'')
842 
843  self.loadAndRemember(self.ConditionsDefaultCFF)
844  from Configuration.AlCa.GlobalTag import GlobalTag
845  self.process.GlobalTag = GlobalTag(self.process.GlobalTag, self._options.conditions, self._options.custom_conditions)
846  self.additionalCommands.append('from Configuration.AlCa.GlobalTag import GlobalTag')
847  self.additionalCommands.append('process.GlobalTag = GlobalTag(process.GlobalTag, %s, %s)' % (repr(self._options.conditions), repr(self._options.custom_conditions)))
848 
849 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addCustomise(), ConfigBuilder.ConfigBuilder.additionalCommands, mps_setup.append, ConfigBuilder.ConfigBuilder.ConditionsDefaultCFF, ConfigBuilder.ConfigBuilder.loadAndRemember(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, and ConfigBuilder.ConfigBuilder.process.

Referenced by ConfigBuilder.ConfigBuilder.completeInputCommand(), and ConfigBuilder.ConfigBuilder.prepare().

◆ addCustomise()

def ConfigBuilder.ConfigBuilder.addCustomise (   self,
  unsch = 0 
)
Include the customise code 

Definition at line 850 of file ConfigBuilder.py.

850  def addCustomise(self,unsch=0):
851  """Include the customise code """
852 
853  custOpt=[]
854  if unsch==0:
855  for c in self._options.customisation_file:
856  custOpt.extend(c.split(","))
857  else:
858  for c in self._options.customisation_file_unsch:
859  custOpt.extend(c.split(","))
860 
861  custMap=DictTypes.SortedKeysDict()
862  for opt in custOpt:
863  if opt=='': continue
864  if opt.count('.')>1:
865  raise Exception("more than . in the specification:"+opt)
866  fileName=opt.split('.')[0]
867  if opt.count('.')==0: rest='customise'
868  else:
869  rest=opt.split('.')[1]
870  if rest=='py': rest='customise' #catch the case of --customise file.py
871 
872  if fileName in custMap:
873  custMap[fileName].extend(rest.split('+'))
874  else:
875  custMap[fileName]=rest.split('+')
876 
877  if len(custMap)==0:
878  final_snippet='\n'
879  else:
880  final_snippet='\n# customisation of the process.\n'
881 
882  allFcn=[]
883  for opt in custMap:
884  allFcn.extend(custMap[opt])
885  for fcn in allFcn:
886  if allFcn.count(fcn)!=1:
887  raise Exception("cannot specify twice "+fcn+" as a customisation method")
888 
889  for f in custMap:
890  # let python search for that package and do syntax checking at the same time
891  packageName = f.replace(".py","").replace("/",".")
892  __import__(packageName)
893  package = sys.modules[packageName]
894 
895  # now ask the package for its definition and pick .py instead of .pyc
896  customiseFile = re.sub(r'\.pyc$', '.py', package.__file__)
897 
898  final_snippet+='\n# Automatic addition of the customisation function from '+packageName+'\n'
899  if self._options.inline_custom:
900  for line in file(customiseFile,'r'):
901  if "import FWCore.ParameterSet.Config" in line:
902  continue
903  final_snippet += line
904  else:
905  final_snippet += 'from %s import %s \n'%(packageName,','.join(custMap[f]))
906  for fcn in custMap[f]:
907  print("customising the process with",fcn,"from",f)
908  if not hasattr(package,fcn):
909  #bound to fail at run time
910  raise Exception("config "+f+" has no function "+fcn)
911  #execute the command
912  self.process=getattr(package,fcn)(self.process)
913  #and print it in the configuration
914  final_snippet += "\n#call to customisation function "+fcn+" imported from "+packageName
915  final_snippet += "\nprocess = %s(process)\n"%(fcn,)
916 
917  if len(custMap)!=0:
918  final_snippet += '\n# End of customisation functions\n'
919 
920 
921  return final_snippet
922 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addCustomiseCmdLine(), geometryDiff.file, join(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, and python.rootplot.root2matplotlib.replace().

Referenced by ConfigBuilder.ConfigBuilder.addConditions(), and ConfigBuilder.ConfigBuilder.prepare().

◆ addCustomiseCmdLine()

def ConfigBuilder.ConfigBuilder.addCustomiseCmdLine (   self)

Definition at line 923 of file ConfigBuilder.py.

923  def addCustomiseCmdLine(self):
924  final_snippet='\n# Customisation from command line\n'
925  if self._options.customise_commands:
926  import string
927  for com in self._options.customise_commands.split('\\n'):
928  com=com.lstrip()
929  self.executeAndRemember(com)
930  final_snippet +='\n'+com
931 
932  return final_snippet
933 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.define_Configs(), and ConfigBuilder.ConfigBuilder.executeAndRemember().

Referenced by ConfigBuilder.ConfigBuilder.addCustomise(), and ConfigBuilder.ConfigBuilder.prepare().

◆ addExtraStream()

def ConfigBuilder.ConfigBuilder.addExtraStream (   self,
  name,
  stream,
  workflow = 'full',
  cppType = "PoolOutputModule" 
)

Definition at line 1154 of file ConfigBuilder.py.

1154  def addExtraStream(self, name, stream, workflow='full', cppType="PoolOutputModule"):
1155  # define output module and go from there
1156  output = cms.OutputModule(cppType)
1157  if stream.selectEvents.parameters_().__len__()!=0:
1158  output.SelectEvents = stream.selectEvents
1159  else:
1160  output.SelectEvents = cms.untracked.PSet()
1161  output.SelectEvents.SelectEvents=cms.vstring()
1162  if isinstance(stream.paths,tuple):
1163  for path in stream.paths:
1164  output.SelectEvents.SelectEvents.append(path.label())
1165  else:
1166  output.SelectEvents.SelectEvents.append(stream.paths.label())
1167 
1168 
1169 
1170  if isinstance(stream.content,str):
1171  evtPset=getattr(self.process,stream.content)
1172  for p in evtPset.parameters_():
1173  setattr(output,p,getattr(evtPset,p))
1174  if not self._options.inlineEventContent:
1175  def doNotInlineEventContent(instance,label = "process."+stream.content+".outputCommands"):
1176  return label
1177  output.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
1178  else:
1179  output.outputCommands = stream.content
1180 
1181 
1182  output.fileName = cms.untracked.string(self._options.dirout+stream.name+'.root')
1183 
1184  output.dataset = cms.untracked.PSet( dataTier = stream.dataTier,
1185  filterName = cms.untracked.string(stream.name))
1186 
1187  if self._options.filtername:
1188  output.dataset.filterName= cms.untracked.string(self._options.filtername+"_"+stream.name)
1189 
1190  if cppType == "PoolOutputModule":
1191  #add an automatic flushing to limit memory consumption
1192  output.eventAutoFlushCompressedSize=cms.untracked.int32(5*1024*1024)
1193 
1194  if workflow in ("producers,full"):
1195  if isinstance(stream.paths,tuple):
1196  for path in stream.paths:
1197  self.schedule.append(path)
1198  else:
1199  self.schedule.append(stream.paths)
1200 
1201 
1202  # in case of relvals we don't want to have additional outputs
1203  if (not self._options.relval) and workflow in ("full","output"):
1204  self.additionalOutputs[name] = output
1205  setattr(self.process,name,output)
1206 
1207  if workflow == 'output':
1208  # adjust the select events to the proper trigger results from previous process
1209  filterList = output.SelectEvents.SelectEvents
1210  for i, filter in enumerate(filterList):
1211  filterList[i] = filter+":"+self._options.triggerResultsProcess
1212 
1213  return output
1214 

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

◆ addMaxEvents()

def ConfigBuilder.ConfigBuilder.addMaxEvents (   self)
Here we decide how many evts will be processed

Definition at line 367 of file ConfigBuilder.py.

367  def addMaxEvents(self):
368  """Here we decide how many evts will be processed"""
369  self.process.maxEvents.input = int(self._options.number)
370  if self._options.number_out:
371  self.process.maxEvents.output = int(self._options.number_out)
372  self.addedObjects.append(("","maxEvents"))
373 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addedObjects, mps_setup.append, createfilelist.int, DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, and ConfigBuilder.ConfigBuilder.process.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ addOutput()

def ConfigBuilder.ConfigBuilder.addOutput (   self)
Add output module to the process 

Definition at line 526 of file ConfigBuilder.py.

526  def addOutput(self):
527  """ Add output module to the process """
528  result=""
529  if self._options.outputDefinition:
530  if self._options.datatier:
531  print("--datatier & --eventcontent options ignored")
532 
533  #new output convention with a list of dict
534  outList = eval(self._options.outputDefinition)
535  for (id,outDefDict) in enumerate(outList):
536  outDefDictStr=outDefDict.__str__()
537  if not isinstance(outDefDict,dict):
538  raise Exception("--output needs to be passed a list of dict"+self._options.outputDefinition+" is invalid")
539  #requires option: tier
540  theTier=anyOf(['t','tier','dataTier'],outDefDict)
541  #optional option: eventcontent, filtername, selectEvents, moduleLabel, filename
542 
543  theStreamType=anyOf(['e','ec','eventContent','streamType'],outDefDict,theTier)
544  theFilterName=anyOf(['f','ftN','filterName'],outDefDict,'')
545  theSelectEvent=anyOf(['s','sE','selectEvents'],outDefDict,'')
546  theModuleLabel=anyOf(['l','mL','moduleLabel'],outDefDict,'')
547  theExtraOutputCommands=anyOf(['o','oC','outputCommands'],outDefDict,'')
548  # module label has a particular role
549  if not theModuleLabel:
550  tryNames=[theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+'output',
551  theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+theFilterName+'output',
552  theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+theFilterName+theSelectEvent.split(',')[0].replace(':','for').replace(' ','')+'output'
553  ]
554  for name in tryNames:
555  if not hasattr(self.process,name):
556  theModuleLabel=name
557  break
558  if not theModuleLabel:
559  raise Exception("cannot find a module label for specification: "+outDefDictStr)
560  if id==0:
561  defaultFileName=self._options.outfile_name
562  else:
563  defaultFileName=self._options.outfile_name.replace('.root','_in'+theTier+'.root')
564 
565  theFileName=self._options.dirout+anyOf(['fn','fileName'],outDefDict,defaultFileName)
566  if not theFileName.endswith('.root'):
567  theFileName+='.root'
568 
569  if len(outDefDict):
570  raise Exception("unused keys from --output options: "+','.join(outDefDict.keys()))
571  if theStreamType=='DQMIO': theStreamType='DQM'
572  if theStreamType=='ALL':
573  theEventContent = cms.PSet(outputCommands = cms.untracked.vstring('keep *'))
574  else:
575  theEventContent = getattr(self.process, theStreamType+"EventContent")
576 
577 
578  addAlCaSelects=False
579  if theStreamType=='ALCARECO' and not theFilterName:
580  theFilterName='StreamALCACombined'
581  addAlCaSelects=True
582 
583  CppType='PoolOutputModule'
584  if self._options.timeoutOutput:
585  CppType='TimeoutPoolOutputModule'
586  if theStreamType=='DQM' and theTier=='DQMIO': CppType='DQMRootOutputModule'
587  output = cms.OutputModule(CppType,
588  theEventContent.clone(),
589  fileName = cms.untracked.string(theFileName),
590  dataset = cms.untracked.PSet(
591  dataTier = cms.untracked.string(theTier),
592  filterName = cms.untracked.string(theFilterName))
593  )
594  if not theSelectEvent and hasattr(self.process,'generation_step') and theStreamType!='LHE':
595  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step'))
596  if not theSelectEvent and hasattr(self.process,'filtering_step'):
597  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filtering_step'))
598  if theSelectEvent:
599  output.SelectEvents =cms.untracked.PSet(SelectEvents = cms.vstring(theSelectEvent))
600 
601  if addAlCaSelects:
602  if not hasattr(output,'SelectEvents'):
603  output.SelectEvents=cms.untracked.PSet(SelectEvents=cms.vstring())
604  for alca in self.AlCaPaths:
605  output.SelectEvents.SelectEvents.extend(getattr(self.process,'OutALCARECO'+alca).SelectEvents.SelectEvents)
606 
607 
608  if hasattr(self.process,theModuleLabel):
609  raise Exception("the current process already has a module "+theModuleLabel+" defined")
610  #print "creating output module ",theModuleLabel
611  setattr(self.process,theModuleLabel,output)
612  outputModule=getattr(self.process,theModuleLabel)
613  setattr(self.process,theModuleLabel+'_step',cms.EndPath(outputModule))
614  path=getattr(self.process,theModuleLabel+'_step')
615  self.schedule.append(path)
616 
617  if not self._options.inlineEventContent and hasattr(self.process,theStreamType+"EventContent"):
618  def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+theStreamType+"EventContent.outputCommands)"): return label
619  outputModule.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
620  if theExtraOutputCommands:
621  if not isinstance(theExtraOutputCommands,list):
622  raise Exception("extra ouput command in --option must be a list of strings")
623  if hasattr(self.process,theStreamType+"EventContent"):
624  self.executeAndRemember('process.%s.outputCommands.extend(%s)'%(theModuleLabel,theExtraOutputCommands))
625  else:
626  outputModule.outputCommands.extend(theExtraOutputCommands)
627 
628  result+="\nprocess."+theModuleLabel+" = "+outputModule.dumpPython()
629 
630 
631  return result
632 
633  streamTypes=self._options.eventcontent.split(',')
634  tiers=self._options.datatier.split(',')
635  if not self._options.outputDefinition and len(streamTypes)!=len(tiers):
636  raise Exception("number of event content arguments does not match number of datatier arguments")
637 
638  # if the only step is alca we don't need to put in an output
639  if self._options.step.split(',')[0].split(':')[0] == 'ALCA':
640  return "\n"
641 
642  for i,(streamType,tier) in enumerate(zip(streamTypes,tiers)):
643  if streamType=='': continue
644  if streamType == 'ALCARECO' and not 'ALCAPRODUCER' in self._options.step: continue
645  if streamType=='DQMIO': streamType='DQM'
646  eventContent=streamType
647 
648  if streamType == "NANOEDMAOD" :
649  eventContent = "NANOAOD"
650  elif streamType == "NANOEDMAODSIM" :
651  eventContent = "NANOAODSIM"
652  theEventContent = getattr(self.process, eventContent+"EventContent")
653  if i==0:
654  theFileName=self._options.outfile_name
655  theFilterName=self._options.filtername
656  else:
657  theFileName=self._options.outfile_name.replace('.root','_in'+streamType+'.root')
658  theFilterName=self._options.filtername
659  CppType='PoolOutputModule'
660  if self._options.timeoutOutput:
661  CppType='TimeoutPoolOutputModule'
662  if streamType=='DQM' and tier=='DQMIO': CppType='DQMRootOutputModule'
663  if "NANOAOD" in streamType : CppType='NanoAODOutputModule'
664  output = cms.OutputModule(CppType,
665  theEventContent,
666  fileName = cms.untracked.string(theFileName),
667  dataset = cms.untracked.PSet(dataTier = cms.untracked.string(tier),
668  filterName = cms.untracked.string(theFilterName)
669  )
670  )
671  if hasattr(self.process,"generation_step") and streamType!='LHE':
672  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step'))
673  if hasattr(self.process,"filtering_step"):
674  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filtering_step'))
675 
676  if streamType=='ALCARECO':
677  output.dataset.filterName = cms.untracked.string('StreamALCACombined')
678 
679  if "MINIAOD" in streamType:
680  from PhysicsTools.PatAlgos.slimming.miniAOD_tools import miniAOD_customizeOutput
682 
683  outputModuleName=streamType+'output'
684  setattr(self.process,outputModuleName,output)
685  outputModule=getattr(self.process,outputModuleName)
686  setattr(self.process,outputModuleName+'_step',cms.EndPath(outputModule))
687  path=getattr(self.process,outputModuleName+'_step')
688  self.schedule.append(path)
689 
690  if self._options.outputCommands and streamType!='DQM':
691  for evct in self._options.outputCommands.split(','):
692  if not evct: continue
693  self.executeAndRemember("process.%s.outputCommands.append('%s')"%(outputModuleName,evct.strip()))
694 
695  if not self._options.inlineEventContent:
696  tmpstreamType=streamType
697  if "NANOEDM" in tmpstreamType :
698  tmpstreamType=tmpstreamType.replace("NANOEDM","NANO")
699  def doNotInlineEventContent(instance,label = "process."+tmpstreamType+"EventContent.outputCommands"):
700  return label
701  outputModule.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
702 
703  result+="\nprocess."+outputModuleName+" = "+outputModule.dumpPython()
704 
705  return result
706 
707 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.AlCaPaths, ConfigBuilder.anyOf(), mps_setup.append, ConfigBuilder.ConfigBuilder.executeAndRemember(), join(), miniAOD_tools.miniAOD_customizeOutput(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, python.rootplot.root2matplotlib.replace(), ConfigBuilder.ConfigBuilder.schedule, submitPVValidationJobs.split(), and ComparisonHelper.zip().

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ addSource()

def ConfigBuilder.ConfigBuilder.addSource (   self)
Here the source is built. Priority: file, generator

Definition at line 374 of file ConfigBuilder.py.

374  def addSource(self):
375  """Here the source is built. Priority: file, generator"""
376  self.addedObjects.append(("Input source","source"))
377 
378  def filesFromOption(self):
379  for entry in self._options.filein.split(','):
380  print("entry",entry)
381  if entry.startswith("filelist:"):
382  filesFromList(entry[9:],self.process.source)
383  elif entry.startswith("dbs:") or entry.startswith("das:"):
384  filesFromDASQuery('file dataset = %s'%(entry[4:]),self._options.dasoption,self.process.source)
385  else:
386  self.process.source.fileNames.append(self._options.dirin+entry)
387  if self._options.secondfilein:
388  if not hasattr(self.process.source,"secondaryFileNames"):
389  raise Exception("--secondfilein not compatible with "+self._options.filetype+"input type")
390  for entry in self._options.secondfilein.split(','):
391  print("entry",entry)
392  if entry.startswith("filelist:"):
393  self.process.source.secondaryFileNames.extend((filesFromList(entry[9:]))[0])
394  elif entry.startswith("dbs:") or entry.startswith("das:"):
395  self.process.source.secondaryFileNames.extend((filesFromDASQuery('file dataset = %s'%(entry[4:]),self._options.dasoption))[0])
396  else:
397  self.process.source.secondaryFileNames.append(self._options.dirin+entry)
398 
399  if self._options.filein or self._options.dasquery:
400  if self._options.filetype == "EDM":
401  self.process.source=cms.Source("PoolSource",
402  fileNames = cms.untracked.vstring(),
403  secondaryFileNames= cms.untracked.vstring())
404  filesFromOption(self)
405  elif self._options.filetype == "DAT":
406  self.process.source=cms.Source("NewEventStreamFileReader",fileNames = cms.untracked.vstring())
407  filesFromOption(self)
408  elif self._options.filetype == "LHE":
409  self.process.source=cms.Source("LHESource", fileNames = cms.untracked.vstring())
410  if self._options.filein.startswith("lhe:"):
411  #list the article directory automatically
412  args=self._options.filein.split(':')
413  article=args[1]
414  print('LHE input from article ',article)
415  location='/store/lhe/'
416  import os
417  textOfFiles=os.popen('cmsLHEtoEOSManager.py -l '+article)
418  for line in textOfFiles:
419  for fileName in [x for x in line.split() if '.lhe' in x]:
420  self.process.source.fileNames.append(location+article+'/'+fileName)
421  #check first if list of LHE files is loaded (not empty)
422  if len(line)<2:
423  print('Issue to load LHE files, please check and try again.')
424  sys.exit(-1)
425  #Additional check to protect empty fileNames in process.source
426  if len(self.process.source.fileNames)==0:
427  print('Issue with empty filename, but can pass line check')
428  sys.exit(-1)
429  if len(args)>2:
430  self.process.source.skipEvents = cms.untracked.uint32(int(args[2]))
431  else:
432  filesFromOption(self)
433 
434  elif self._options.filetype == "DQM":
435  self.process.source=cms.Source("DQMRootSource",
436  fileNames = cms.untracked.vstring())
437  filesFromOption(self)
438 
439  elif self._options.filetype == "DQMDAQ":
440  # FIXME: how to configure it if there are no input files specified?
441  self.process.source=cms.Source("DQMStreamerReader")
442 
443 
444  if ('HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys()) and (not self._options.filetype == "DQM"):
445  self.process.source.processingMode = cms.untracked.string("RunsAndLumis")
446 
447  if self._options.dasquery!='':
448  self.process.source=cms.Source("PoolSource", fileNames = cms.untracked.vstring(),secondaryFileNames = cms.untracked.vstring())
449  filesFromDASQuery(self._options.dasquery,self._options.dasoption,self.process.source)
450 
451  if ('HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys()) and (not self._options.filetype == "DQM"):
452  self.process.source.processingMode = cms.untracked.string("RunsAndLumis")
453 
454 
455  if 'GEN' in self.stepMap.keys() and not self._options.filetype == "LHE":
456  if self._options.inputCommands:
457  self._options.inputCommands+=',drop LHEXMLStringProduct_*_*_*,'
458  else:
459  self._options.inputCommands='keep *, drop LHEXMLStringProduct_*_*_*,'
460 
461  if self.process.source and self._options.inputCommands and not self._options.filetype == "LHE":
462  if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring()
463  for command in self._options.inputCommands.split(','):
464  # remove whitespace around the keep/drop statements
465  command = command.strip()
466  if command=='': continue
467  self.process.source.inputCommands.append(command)
468  if not self._options.dropDescendant:
469  self.process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool(False)
470 
471  if self._options.lumiToProcess:
472  import FWCore.PythonUtilities.LumiList as LumiList
473  self.process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange( LumiList.LumiList(self._options.lumiToProcess).getCMSSWString().split(',') )
474 
475  if 'GEN' in self.stepMap.keys() or 'LHE' in self.stepMap or (not self._options.filein and hasattr(self._options, "evt_type")):
476  if self.process.source is None:
477  self.process.source=cms.Source("EmptySource")
478 
479  # modify source in case of run-dependent MC
480  self.runsAndWeights=None
481  if self._options.runsAndWeightsForMC or self._options.runsScenarioForMC :
482  if not self._options.isMC :
483  raise Exception("options --runsAndWeightsForMC and --runsScenarioForMC are only valid for MC")
484  if self._options.runsAndWeightsForMC:
485  self.runsAndWeights = eval(self._options.runsAndWeightsForMC)
486  else:
487  from Configuration.StandardSequences.RunsAndWeights import RunsAndWeights
488  if isinstance(RunsAndWeights[self._options.runsScenarioForMC], str):
489  __import__(RunsAndWeights[self._options.runsScenarioForMC])
490  self.runsAndWeights = sys.modules[RunsAndWeights[self._options.runsScenarioForMC]].runProbabilityDistribution
491  else:
492  self.runsAndWeights = RunsAndWeights[self._options.runsScenarioForMC]
493 
494  if self.runsAndWeights:
495  import SimGeneral.Configuration.ThrowAndSetRandomRun as ThrowAndSetRandomRun
496  ThrowAndSetRandomRun.throwAndSetRandomRun(self.process.source,self.runsAndWeights)
497  self.additionalCommands.append('import SimGeneral.Configuration.ThrowAndSetRandomRun as ThrowAndSetRandomRun')
498  self.additionalCommands.append('ThrowAndSetRandomRun.throwAndSetRandomRun(process.source,%s)'%(self.runsAndWeights))
499 
500  # modify source in case of run-dependent MC (Run-3 method)
501  self.runsAndWeightsInt=None
502  if self._options.runsAndWeightsForMCIntegerWeights or self._options.runsScenarioForMCIntegerWeights:
503  if not self._options.isMC :
504  raise Exception("options --runsAndWeightsForMCIntegerWeights and --runsScenarioForMCIntegerWeights are only valid for MC")
505  if self._options.runsAndWeightsForMCIntegerWeights:
506  self.runsAndWeightsInt = eval(self._options.runsAndWeightsForMCIntegerWeights)
507  else:
508  from Configuration.StandardSequences.RunsAndWeights import RunsAndWeights
509  if isinstance(RunsAndWeights[self._options.runsScenarioForMCIntegerWeights], str):
510  __import__(RunsAndWeights[self._options.runsScenarioForMCIntegerWeights])
511  self.runsAndWeightsInt = sys.modules[RunsAndWeights[self._options.runsScenarioForMCIntegerWeights]].runProbabilityDistribution
512  else:
513  self.runsAndWeightsInt = RunsAndWeights[self._options.runsScenarioForMCIntegerWeights]
514 
515  if self.runsAndWeightsInt:
516  if not self._options.relval:
517  raise Exception("--relval option required when using --runsAndWeightsInt")
518  if 'DATAMIX' in self._options.step:
519  from SimGeneral.Configuration.LumiToRun import lumi_to_run
520  total_events, events_per_job = self._options.relval.split(',')
521  lumi_to_run_mapping = lumi_to_run(self.runsAndWeightsInt, int(total_events), int(events_per_job))
522  self.additionalCommands.append("process.source.firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID(*[cms.LuminosityBlockID(x,y) for x,y in " + str(lumi_to_run_mapping) + "])")
523 
524  return
525 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addedObjects, mps_setup.append, ConfigBuilder.filesFromDASQuery(), ConfigBuilder.filesFromList(), createfilelist.int, relativeConstraints.keys, print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, submitPVValidationJobs.split(), and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ addStandardSequences()

def ConfigBuilder.ConfigBuilder.addStandardSequences (   self)
Add selected standard sequences to the process

Definition at line 708 of file ConfigBuilder.py.

708  def addStandardSequences(self):
709  """
710  Add selected standard sequences to the process
711  """
712  # load the pile up file
713  if self._options.pileup:
714  pileupSpec=self._options.pileup.split(',')[0]
715 
716  # Does the requested pile-up scenario exist?
717  from Configuration.StandardSequences.Mixing import Mixing,defineMixing
718  if not pileupSpec in Mixing and '.' not in pileupSpec and 'file:' not in pileupSpec:
719  message = pileupSpec+' is not a know mixing scenario:\n available are: '+'\n'.join(Mixing.keys())
720  raise Exception(message)
721 
722  # Put mixing parameters in a dictionary
723  if '.' in pileupSpec:
724  mixingDict={'file':pileupSpec}
725  elif pileupSpec.startswith('file:'):
726  mixingDict={'file':pileupSpec[5:]}
727  else:
728  import copy
729  mixingDict=copy.copy(Mixing[pileupSpec])
730  if len(self._options.pileup.split(','))>1:
731  mixingDict.update(eval(self._options.pileup[self._options.pileup.find(',')+1:]))
732 
733  # Load the pu cfg file corresponding to the requested pu scenario
734  if 'file:' in pileupSpec:
735  #the file is local
736  self.process.load(mixingDict['file'])
737  print("inlining mixing module configuration")
738  self._options.inlineObjets+=',mix'
739  else:
740  self.loadAndRemember(mixingDict['file'])
741 
742  mixingDict.pop('file')
743  if not "DATAMIX" in self.stepMap.keys(): # when DATAMIX is present, pileup_input refers to pre-mixed GEN-RAW
744  if self._options.pileup_input:
745  if self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:'):
746  mixingDict['F']=filesFromDASQuery('file dataset = %s'%(self._options.pileup_input[4:],),self._options.pileup_dasoption)[0]
747  elif self._options.pileup_input.startswith("filelist:"):
748  mixingDict['F']=(filesFromList(self._options.pileup_input[9:]))[0]
749  else:
750  mixingDict['F']=self._options.pileup_input.split(',')
751  specialization=defineMixing(mixingDict)
752  for command in specialization:
753  self.executeAndRemember(command)
754  if len(mixingDict)!=0:
755  raise Exception('unused mixing specification: '+mixingDict.keys().__str__())
756 
757 
758  # load the geometry file
759  try:
760  if len(self.stepMap):
761  self.loadAndRemember(self.GeometryCFF)
762  if ('SIM' in self.stepMap or 'reSIM' in self.stepMap) and not self._options.fast:
763  self.loadAndRemember(self.SimGeometryCFF)
764  if self.geometryDBLabel:
765  self.executeAndRemember('if hasattr(process, "XMLFromDBSource"): process.XMLFromDBSource.label="%s"'%(self.geometryDBLabel))
766  self.executeAndRemember('if hasattr(process, "DDDetectorESProducerFromDB"): process.DDDetectorESProducerFromDB.label="%s"'%(self.geometryDBLabel))
767 
768  except ImportError:
769  print("Geometry option",self._options.geometry,"unknown.")
770  raise
771 
772  if len(self.stepMap):
773  self.loadAndRemember(self.magFieldCFF)
774 
775  for stepName in self.stepKeys:
776  stepSpec = self.stepMap[stepName]
777  print("Step:", stepName,"Spec:",stepSpec)
778  if stepName.startswith('re'):
779 
780  if stepName[2:] not in self._options.donotDropOnInput:
781  self._options.inputEventContent='%s,%s'%(stepName.upper(),self._options.inputEventContent)
782  stepName=stepName[2:]
783  if stepSpec=="":
784  getattr(self,"prepare_"+stepName)(sequence = getattr(self,stepName+"DefaultSeq"))
785  elif isinstance(stepSpec, list):
786  getattr(self,"prepare_"+stepName)(sequence = '+'.join(stepSpec))
787  elif isinstance(stepSpec, tuple):
788  getattr(self,"prepare_"+stepName)(sequence = ','.join([stepSpec[1],'+'.join(stepSpec[0])]))
789  else:
790  raise ValueError("Invalid step definition")
791 
792  if self._options.restoreRNDSeeds!=False:
793  #it is either True, or a process name
794  if self._options.restoreRNDSeeds==True:
795  self.executeAndRemember('process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")')
796  else:
797  self.executeAndRemember('process.RandomNumberGeneratorService.restoreStateTag=cms.untracked.InputTag("randomEngineStateProducer","","%s")'%(self._options.restoreRNDSeeds))
798  if self._options.inputEventContent or self._options.inputCommands:
799  if self._options.inputCommands:
800  self._options.inputCommands+='keep *_randomEngineStateProducer_*_*,'
801  else:
802  self._options.inputCommands='keep *_randomEngineStateProducer_*_*,'
803 
804 

References TriggerAnalyzer.__str__(), ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.completeInputCommand(), Mixing.defineMixing(), ConfigBuilder.ConfigBuilder.executeAndRemember(), ConfigBuilder.filesFromDASQuery(), ConfigBuilder.filesFromList(), ConfigBuilder.ConfigBuilder.GeometryCFF, ConfigBuilder.ConfigBuilder.geometryDBLabel, join(), relativeConstraints.keys, ConfigBuilder.ConfigBuilder.load(), ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.magFieldCFF, print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.SimGeometryCFF, ConfigBuilder.ConfigBuilder.stepKeys, and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.addOutput(), and ConfigBuilder.ConfigBuilder.prepare().

◆ build_production_info()

def ConfigBuilder.ConfigBuilder.build_production_info (   self,
  evt_type,
  evtnumber 
)
Add useful info for the production. 

Definition at line 2096 of file ConfigBuilder.py.

2096  def build_production_info(self, evt_type, evtnumber):
2097  """ Add useful info for the production. """
2098  self.process.configurationMetadata=cms.untracked.PSet\
2099  (version=cms.untracked.string("$Revision: 1.19 $"),
2100  name=cms.untracked.string("Applications"),
2101  annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber))
2102  )
2103 
2104  self.addedObjects.append(("Production Info","configurationMetadata"))
2105 
2106 

References ConfigBuilder.ConfigBuilder.addedObjects, mps_setup.append, ConfigBuilder.ConfigBuilder.create_process(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, and str.

Referenced by ConfigBuilder.ConfigBuilder.finalizeFastSimHLT(), and ConfigBuilder.ConfigBuilder.prepare().

◆ completeInputCommand()

def ConfigBuilder.ConfigBuilder.completeInputCommand (   self)

Definition at line 805 of file ConfigBuilder.py.

805  def completeInputCommand(self):
806  if self._options.inputEventContent:
807  import copy
808  def dropSecondDropStar(iec):
809  #drop occurence of 'drop *' in the list
810  count=0
811  for item in iec:
812  if item=='drop *':
813  if count!=0:
814  iec.remove(item)
815  count+=1
816 
817 
818  if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring()
819  for evct in self._options.inputEventContent.split(','):
820  if evct=='': continue
821  theEventContent = getattr(self.process, evct+"EventContent")
822  if hasattr(theEventContent,'outputCommands'):
823  self.process.source.inputCommands.extend(copy.copy(theEventContent.outputCommands))
824  if hasattr(theEventContent,'inputCommands'):
825  self.process.source.inputCommands.extend(copy.copy(theEventContent.inputCommands))
826 
827  dropSecondDropStar(self.process.source.inputCommands)
828 
829  if not self._options.dropDescendant:
830  self.process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool(False)
831 
832 
833  return
834 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addConditions(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, and ConfigBuilder.ConfigBuilder.process.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences(), and ConfigBuilder.ConfigBuilder.prepare().

◆ create_process()

def ConfigBuilder.ConfigBuilder.create_process (   self)

Definition at line 2107 of file ConfigBuilder.py.

2107  def create_process(self):
2108  self.pythonCfgCode = "# Auto generated configuration file\n"
2109  self.pythonCfgCode += "# using: \n# "+__version__[1:-1]+"\n# "+__source__[1:-1]+'\n'
2110  self.pythonCfgCode += "# with command line options: "+self._options.arguments+'\n'
2111  self.pythonCfgCode += "import FWCore.ParameterSet.Config as cms\n\n"
2112 
2113  # now set up the modifies
2114  modifiers=[]
2115  modifierStrings=[]
2116  modifierImports=[]
2117 
2118  if hasattr(self._options,"era") and self._options.era :
2119  # Multiple eras can be specified in a comma seperated list
2120  from Configuration.StandardSequences.Eras import eras
2121  for requestedEra in self._options.era.split(",") :
2122  modifierStrings.append(requestedEra)
2123  modifierImports.append(eras.pythonCfgLines[requestedEra])
2124  modifiers.append(getattr(eras,requestedEra))
2125 
2126 
2127  if hasattr(self._options,"procModifiers") and self._options.procModifiers:
2128  import importlib
2129  thingsImported=[]
2130  for pm in self._options.procModifiers.split(','):
2131  modifierStrings.append(pm)
2132  modifierImports.append('from Configuration.ProcessModifiers.'+pm+'_cff import '+pm)
2133  modifiers.append(getattr(importlib.import_module('Configuration.ProcessModifiers.'+pm+'_cff'),pm))
2134 
2135  self.pythonCfgCode += '\n'.join(modifierImports)+'\n\n'
2136  self.pythonCfgCode += "process = cms.Process('"+self._options.name+"'" # Start of the line, finished after the loop
2137 
2138 
2139  if len(modifierStrings)>0:
2140  self.pythonCfgCode+= ','+','.join(modifierStrings)
2141  self.pythonCfgCode+=')\n\n'
2142 
2143  #yes, the cfg code gets out of sync here if a process is passed in. That could be fixed in the future
2144  #assuming there is some way for the fwk to get the list of modifiers (and their stringified name)
2145  if self.process == None:
2146  if len(modifiers)>0:
2147  self.process = cms.Process(self._options.name,*modifiers)
2148  else:
2149  self.process = cms.Process(self._options.name)
2150 
2151 
2152 
2153 

References ConfigBuilder.ConfigBuilder.pythonCfgCode.

Referenced by ConfigBuilder.ConfigBuilder.build_production_info().

◆ define_Configs()

def ConfigBuilder.ConfigBuilder.define_Configs (   self)

Definition at line 938 of file ConfigBuilder.py.

938  def define_Configs(self):
939  if len(self.stepMap):
940  self.loadAndRemember('Configuration/StandardSequences/Services_cff')
941  if self._options.particleTable not in defaultOptions.particleTableList:
942  print('Invalid particle table provided. Options are:')
943  print(defaultOptions.particleTable)
944  sys.exit(-1)
945  else:
946  if len(self.stepMap):
947  self.loadAndRemember('SimGeneral.HepPDTESSource.'+self._options.particleTable+'_cfi')
948 
949  self.loadAndRemember('FWCore/MessageService/MessageLogger_cfi')
950 
951  self.ALCADefaultCFF="Configuration/StandardSequences/AlCaRecoStreams_cff"
952  self.GENDefaultCFF="Configuration/StandardSequences/Generator_cff"
953  self.SIMDefaultCFF="Configuration/StandardSequences/Sim_cff"
954  self.DIGIDefaultCFF="Configuration/StandardSequences/Digi_cff"
955  self.DIGI2RAWDefaultCFF="Configuration/StandardSequences/DigiToRaw_cff"
956  self.L1EMDefaultCFF='Configuration/StandardSequences/SimL1Emulator_cff'
957  self.L1MENUDefaultCFF="Configuration/StandardSequences/L1TriggerDefaultMenu_cff"
958  self.HLTDefaultCFF="Configuration/StandardSequences/HLTtable_cff"
959  self.RAW2DIGIDefaultCFF="Configuration/StandardSequences/RawToDigi_Data_cff"
960  if self._options.isRepacked: self.RAW2DIGIDefaultCFF="Configuration/StandardSequences/RawToDigi_DataMapper_cff"
961  self.L1RecoDefaultCFF="Configuration/StandardSequences/L1Reco_cff"
962  self.L1TrackTriggerDefaultCFF="Configuration/StandardSequences/L1TrackTrigger_cff"
963  self.RECODefaultCFF="Configuration/StandardSequences/Reconstruction_Data_cff"
964  self.RECOSIMDefaultCFF="Configuration/StandardSequences/RecoSim_cff"
965  self.PATDefaultCFF="Configuration/StandardSequences/PAT_cff"
966  self.NANODefaultCFF="PhysicsTools/NanoAOD/nano_cff"
967  self.NANOGENDefaultCFF="PhysicsTools/NanoAOD/nanogen_cff"
968  self.EIDefaultCFF=None
969  self.SKIMDefaultCFF="Configuration/StandardSequences/Skims_cff"
970  self.POSTRECODefaultCFF="Configuration/StandardSequences/PostRecoGenerator_cff"
971  self.VALIDATIONDefaultCFF="Configuration/StandardSequences/Validation_cff"
972  self.L1HwValDefaultCFF = "Configuration/StandardSequences/L1HwVal_cff"
973  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOffline_cff"
974  self.HARVESTINGDefaultCFF="Configuration/StandardSequences/Harvesting_cff"
975  self.ALCAHARVESTDefaultCFF="Configuration/StandardSequences/AlCaHarvesting_cff"
976  self.ENDJOBDefaultCFF="Configuration/StandardSequences/EndOfProcess_cff"
977  self.ConditionsDefaultCFF = "Configuration/StandardSequences/FrontierConditions_GlobalTag_cff"
978  self.CFWRITERDefaultCFF = "Configuration/StandardSequences/CrossingFrameWriter_cff"
979  self.REPACKDefaultCFF="Configuration/StandardSequences/DigiToRaw_Repack_cff"
980 
981  if "DATAMIX" in self.stepMap.keys():
982  self.DATAMIXDefaultCFF="Configuration/StandardSequences/DataMixer"+self._options.datamix+"_cff"
983  self.DIGIDefaultCFF="Configuration/StandardSequences/DigiDM_cff"
984  self.DIGI2RAWDefaultCFF="Configuration/StandardSequences/DigiToRawDM_cff"
985  self.L1EMDefaultCFF='Configuration/StandardSequences/SimL1EmulatorDM_cff'
986 
987  self.ALCADefaultSeq=None
988  self.LHEDefaultSeq='externalLHEProducer'
989  self.GENDefaultSeq='pgen'
990  self.SIMDefaultSeq='psim'
991  self.DIGIDefaultSeq='pdigi'
992  self.DATAMIXDefaultSeq=None
993  self.DIGI2RAWDefaultSeq='DigiToRaw'
994  self.HLTDefaultSeq='GRun'
995  self.L1DefaultSeq=None
996  self.L1REPACKDefaultSeq='GT'
997  self.HARVESTINGDefaultSeq=None
998  self.ALCAHARVESTDefaultSeq=None
999  self.CFWRITERDefaultSeq=None
1000  self.RAW2DIGIDefaultSeq='RawToDigi'
1001  self.L1RecoDefaultSeq='L1Reco'
1002  self.L1TrackTriggerDefaultSeq='L1TrackTrigger'
1003  if self._options.fast or ('RAW2DIGI' in self.stepMap and 'RECO' in self.stepMap):
1004  self.RECODefaultSeq='reconstruction'
1005  else:
1006  self.RECODefaultSeq='reconstruction_fromRECO'
1007  self.RECOSIMDefaultSeq='recosim'
1008  self.EIDefaultSeq='top'
1009  self.POSTRECODefaultSeq=None
1010  self.L1HwValDefaultSeq='L1HwVal'
1011  self.DQMDefaultSeq='DQMOffline'
1012  self.VALIDATIONDefaultSeq=''
1013  self.ENDJOBDefaultSeq='endOfProcess'
1014  self.REPACKDefaultSeq='DigiToRawRepack'
1015  self.PATDefaultSeq='miniAOD'
1016  self.PATGENDefaultSeq='miniGEN'
1017  #TODO: Check based of file input
1018  self.NANOGENDefaultSeq='nanogenSequence'
1019  self.NANODefaultSeq='nanoSequence'
1020 
1021  self.EVTCONTDefaultCFF="Configuration/EventContent/EventContent_cff"
1022 
1023  if not self._options.beamspot:
1024  self._options.beamspot=VtxSmearedDefaultKey
1025 
1026  # if its MC then change the raw2digi
1027  if self._options.isMC==True:
1028  self.RAW2DIGIDefaultCFF="Configuration/StandardSequences/RawToDigi_cff"
1029  self.RECODefaultCFF="Configuration/StandardSequences/Reconstruction_cff"
1030  self.PATDefaultCFF="Configuration/StandardSequences/PATMC_cff"
1031  self.PATGENDefaultCFF="Configuration/StandardSequences/PATGEN_cff"
1032  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineMC_cff"
1033  self.ALCADefaultCFF="Configuration/StandardSequences/AlCaRecoStreamsMC_cff"
1034  self.NANODefaultSeq='nanoSequenceMC'
1035  else:
1036  self._options.beamspot = None
1037 
1038  #patch for gen, due to backward incompatibility
1039  if 'reGEN' in self.stepMap:
1040  self.GENDefaultSeq='fixGenInfo'
1041 
1042  if self._options.scenario=='cosmics':
1043  self._options.pileup='Cosmics'
1044  self.DIGIDefaultCFF="Configuration/StandardSequences/DigiCosmics_cff"
1045  self.RECODefaultCFF="Configuration/StandardSequences/ReconstructionCosmics_cff"
1046  self.SKIMDefaultCFF="Configuration/StandardSequences/SkimsCosmics_cff"
1047  self.EVTCONTDefaultCFF="Configuration/EventContent/EventContentCosmics_cff"
1048  self.VALIDATIONDefaultCFF="Configuration/StandardSequences/ValidationCosmics_cff"
1049  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineCosmics_cff"
1050  if self._options.isMC==True:
1051  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineCosmicsMC_cff"
1052  self.HARVESTINGDefaultCFF="Configuration/StandardSequences/HarvestingCosmics_cff"
1053  self.RECODefaultSeq='reconstructionCosmics'
1054  self.DQMDefaultSeq='DQMOfflineCosmics'
1055 
1056  if self._options.scenario=='HeavyIons':
1057  if not self._options.beamspot:
1058  self._options.beamspot=VtxSmearedHIDefaultKey
1059  self.HLTDefaultSeq = 'HIon'
1060  self.VALIDATIONDefaultCFF="Configuration/StandardSequences/ValidationHeavyIons_cff"
1061  self.VALIDATIONDefaultSeq=''
1062  self.EVTCONTDefaultCFF="Configuration/EventContent/EventContentHeavyIons_cff"
1063  self.RECODefaultCFF="Configuration/StandardSequences/ReconstructionHeavyIons_cff"
1064  self.RECODefaultSeq='reconstructionHeavyIons'
1065  self.ALCADefaultCFF = "Configuration/StandardSequences/AlCaRecoStreamsHeavyIons_cff"
1066  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineHeavyIons_cff"
1067  self.DQMDefaultSeq='DQMOfflineHeavyIons'
1068  self.SKIMDefaultCFF="Configuration/StandardSequences/SkimsHeavyIons_cff"
1069  self.HARVESTINGDefaultCFF="Configuration/StandardSequences/HarvestingHeavyIons_cff"
1070  if self._options.isMC==True:
1071  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineHeavyIonsMC_cff"
1072 
1073 
1074  self.RAW2RECODefaultSeq=','.join([self.RAW2DIGIDefaultSeq,self.RECODefaultSeq])
1075 
1076  self.USERDefaultSeq='user'
1077  self.USERDefaultCFF=None
1078 
1079  # the magnetic field
1080  self.magFieldCFF = 'Configuration/StandardSequences/MagneticField_'+self._options.magField.replace('.','')+'_cff'
1081  self.magFieldCFF = self.magFieldCFF.replace("__",'_')
1082 
1083  # the geometry
1084  self.GeometryCFF='Configuration/StandardSequences/GeometryRecoDB_cff'
1085  self.geometryDBLabel=None
1086  simGeometry=''
1087  if self._options.fast:
1088  if 'start' in self._options.conditions.lower():
1089  self.GeometryCFF='FastSimulation/Configuration/Geometries_START_cff'
1090  else:
1091  self.GeometryCFF='FastSimulation/Configuration/Geometries_MC_cff'
1092  else:
1093  def inGeometryKeys(opt):
1094  from Configuration.StandardSequences.GeometryConf import GeometryConf
1095  if opt in GeometryConf:
1096  return GeometryConf[opt]
1097  else:
1098  return opt
1099 
1100  geoms=self._options.geometry.split(',')
1101  if len(geoms)==1: geoms=inGeometryKeys(geoms[0]).split(',')
1102  if len(geoms)==2:
1103  #may specify the reco geometry
1104  if '/' in geoms[1] or '_cff' in geoms[1]:
1105  self.GeometryCFF=geoms[1]
1106  else:
1107  self.GeometryCFF='Configuration/Geometry/Geometry'+geoms[1]+'_cff'
1108 
1109  if (geoms[0].startswith('DB:')):
1110  self.SimGeometryCFF='Configuration/StandardSequences/GeometrySimDB_cff'
1111  self.geometryDBLabel=geoms[0][3:]
1112  print("with DB:")
1113  else:
1114  if '/' in geoms[0] or '_cff' in geoms[0]:
1115  self.SimGeometryCFF=geoms[0]
1116  else:
1117  simGeometry=geoms[0]
1118  if self._options.gflash==True:
1119  self.SimGeometryCFF='Configuration/Geometry/Geometry'+geoms[0]+'GFlash_cff'
1120  else:
1121  self.SimGeometryCFF='Configuration/Geometry/Geometry'+geoms[0]+'_cff'
1122 
1123  # synchronize the geometry configuration and the FullSimulation sequence to be used
1124  if simGeometry not in defaultOptions.geometryExtendedOptions:
1125  self.SIMDefaultCFF="Configuration/StandardSequences/SimIdeal_cff"
1126 
1127  if self._options.scenario=='nocoll' or self._options.scenario=='cosmics':
1128  self.SIMDefaultCFF="Configuration/StandardSequences/SimNOBEAM_cff"
1129  self._options.beamspot='NoSmear'
1130 
1131  # fastsim requires some changes to the default cff files and sequences
1132  if self._options.fast:
1133  self.SIMDefaultCFF = 'FastSimulation.Configuration.SimIdeal_cff'
1134  self.RECODefaultCFF= 'FastSimulation.Configuration.Reconstruction_AftMix_cff'
1135  self.RECOBEFMIXDefaultCFF = 'FastSimulation.Configuration.Reconstruction_BefMix_cff'
1136  self.RECOBEFMIXDefaultSeq = 'reconstruction_befmix'
1137  self.NANODefaultSeq = 'nanoSequenceFS'
1138  self.DQMOFFLINEDefaultCFF="DQMOffline.Configuration.DQMOfflineFS_cff"
1139 
1140  # Mixing
1141  if self._options.pileup=='default':
1142  from Configuration.StandardSequences.Mixing import MixingDefaultKey
1143  self._options.pileup=MixingDefaultKey
1144 
1145 
1146  #not driven by a default cff anymore
1147  if self._options.isData:
1148  self._options.pileup=None
1149 
1150 
1151  self.REDIGIDefaultSeq=self.DIGIDefaultSeq
1152 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.ALCADefaultCFF, ConfigBuilder.ConfigBuilder.loadAndRemember(), print(), and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.addCustomiseCmdLine().

◆ executeAndRemember()

def ConfigBuilder.ConfigBuilder.executeAndRemember (   self,
  command 
)
helper routine to remember replace statements

Definition at line 330 of file ConfigBuilder.py.

330  def executeAndRemember(self, command):
331  """helper routine to remember replace statements"""
332  self.additionalCommands.append(command)
333  if not command.strip().startswith("#"):
334  # substitute: process.foo = process.bar -> self.process.foo = self.process.bar
335  import re
336  exec(re.sub(r"([^a-zA-Z_0-9]|^)(process)([^a-zA-Z_0-9])",r"\1self.process\3",command))
337  #exec(command.replace("process.","self.process."))
338 

References ConfigBuilder.ConfigBuilder.additionalCommands, and mps_setup.append.

Referenced by ConfigBuilder.ConfigBuilder.addCustomiseCmdLine(), ConfigBuilder.ConfigBuilder.addOutput(), ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST(), ConfigBuilder.ConfigBuilder.prepare_DATAMIX(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), ConfigBuilder.ConfigBuilder.prepare_GEN(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_SIM(), and ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

◆ expandMapping()

def ConfigBuilder.ConfigBuilder.expandMapping (   self,
  seqList,
  mapping,
  index = None 
)

Definition at line 1951 of file ConfigBuilder.py.

1951  def expandMapping(self,seqList,mapping,index=None):
1952  maxLevel=30
1953  level=0
1954  while '@' in repr(seqList) and level<maxLevel:
1955  level+=1
1956  for specifiedCommand in seqList:
1957  if specifiedCommand.startswith('@'):
1958  location=specifiedCommand[1:]
1959  if not location in mapping:
1960  raise Exception("Impossible to map "+location+" from "+repr(mapping))
1961  mappedTo=mapping[location]
1962  if index!=None:
1963  mappedTo=mappedTo[index]
1964  seqList.remove(specifiedCommand)
1965  seqList.extend(mappedTo.split('+'))
1966  break;
1967  if level==maxLevel:
1968  raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
1969 

References ConfigBuilder.ConfigBuilder.prepare_DQM().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCA(), ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST(), ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_SKIM(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), and ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence().

◆ finalizeFastSimHLT()

def ConfigBuilder.ConfigBuilder.finalizeFastSimHLT (   self)

Definition at line 2091 of file ConfigBuilder.py.

2091  def finalizeFastSimHLT(self):
2092  self.process.reconstruction = cms.Path(self.process.reconstructionWithFamos)
2093  self.schedule.append(self.process.reconstruction)
2094 
2095 

References mps_setup.append, ConfigBuilder.ConfigBuilder.build_production_info(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, and ConfigBuilder.ConfigBuilder.schedule.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ENDJOB().

◆ load()

def ConfigBuilder.ConfigBuilder.load (   self,
  includeFile 
)

◆ loadAndRemember()

def ConfigBuilder.ConfigBuilder.loadAndRemember (   self,
  includeFile 
)
helper routine to load am memorize imports

Definition at line 321 of file ConfigBuilder.py.

321  def loadAndRemember(self, includeFile):
322  """helper routine to load am memorize imports"""
323  # we could make the imports a on-the-fly data method of the process instance itself
324  # not sure if the latter is a good idea
325  includeFile = includeFile.replace('/','.')
326  self.imports.append(includeFile)
327  self.process.load(includeFile)
328  return sys.modules[includeFile]
329 

References mps_setup.append, ConfigBuilder.ConfigBuilder.imports, ConfigBuilder.ConfigBuilder.load(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, and ConfigBuilder.ConfigBuilder.process.

Referenced by ConfigBuilder.ConfigBuilder.addConditions(), ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.define_Configs(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare(), ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST(), ConfigBuilder.ConfigBuilder.prepare_CFWRITER(), ConfigBuilder.ConfigBuilder.prepare_DATAMIX(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_GEN(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_L1(), ConfigBuilder.ConfigBuilder.prepare_L1REPACK(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), ConfigBuilder.ConfigBuilder.prepare_POSTRECO(), and ConfigBuilder.ConfigBuilder.prepare_SIM().

◆ loadDefaultOrSpecifiedCFF()

def ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF (   self,
  sequence,
  defaultCFF 
)

Definition at line 1220 of file ConfigBuilder.py.

1220  def loadDefaultOrSpecifiedCFF(self, sequence,defaultCFF):
1221  if ( len(sequence.split('.'))==1 ):
1222  l=self.loadAndRemember(defaultCFF)
1223  elif ( len(sequence.split('.'))==2 ):
1224  l=self.loadAndRemember(sequence.split('.')[0])
1225  sequence=sequence.split('.')[1]
1226  else:
1227  print("sub sequence configuration must be of the form dir/subdir/cff.a+b+c or cff.a")
1228  print(sequence,"not recognized")
1229  raise
1230  return l
1231 

References ConfigBuilder.ConfigBuilder.loadAndRemember(), print(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCA(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW(), ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_EI(), ConfigBuilder.ConfigBuilder.prepare_ENDJOB(), ConfigBuilder.ConfigBuilder.prepare_GEN(), ConfigBuilder.ConfigBuilder.prepare_L1HwVal(), ConfigBuilder.ConfigBuilder.prepare_L1Reco(), ConfigBuilder.ConfigBuilder.prepare_L1TrackTrigger(), ConfigBuilder.ConfigBuilder.prepare_NANO(), ConfigBuilder.ConfigBuilder.prepare_NANOGEN(), ConfigBuilder.ConfigBuilder.prepare_PAT(), ConfigBuilder.ConfigBuilder.prepare_PATGEN(), ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI(), ConfigBuilder.ConfigBuilder.prepare_RECO(), ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX(), ConfigBuilder.ConfigBuilder.prepare_RECOSIM(), ConfigBuilder.ConfigBuilder.prepare_REPACK(), ConfigBuilder.ConfigBuilder.prepare_SIM(), ConfigBuilder.ConfigBuilder.prepare_SKIM(), ConfigBuilder.ConfigBuilder.prepare_USER(), and ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

◆ prepare()

def ConfigBuilder.ConfigBuilder.prepare (   self,
  doChecking = False 
)
Prepare the configuration string and add missing pieces.

Definition at line 2154 of file ConfigBuilder.py.

2154  def prepare(self, doChecking = False):
2155  """ Prepare the configuration string and add missing pieces."""
2156 
2157  self.loadAndRemember(self.EVTCONTDefaultCFF) #load the event contents regardless
2158  self.addMaxEvents()
2159  if self.with_input:
2160  self.addSource()
2161  self.addStandardSequences()
2162 
2163  self.completeInputCommand()
2164  self.addConditions()
2165 
2166 
2167  outputModuleCfgCode=""
2168  if not 'HARVESTING' in self.stepMap.keys() and not 'ALCAHARVEST' in self.stepMap.keys() and not 'ALCAOUTPUT' in self.stepMap.keys() and self.with_output:
2169  outputModuleCfgCode=self.addOutput()
2170 
2171  self.addCommon()
2172 
2173  self.pythonCfgCode += "# import of standard configurations\n"
2174  for module in self.imports:
2175  self.pythonCfgCode += ("process.load('"+module+"')\n")
2176 
2177  # production info
2178  if not hasattr(self.process,"configurationMetadata"):
2179  self.build_production_info(self._options.evt_type, self._options.number)
2180  else:
2181  #the PSet was added via a load
2182  self.addedObjects.append(("Production Info","configurationMetadata"))
2183 
2184  self.pythonCfgCode +="\n"
2185  for comment,object in self.addedObjects:
2186  if comment!="":
2187  self.pythonCfgCode += "\n# "+comment+"\n"
2188  self.pythonCfgCode += dumpPython(self.process,object)
2189 
2190  # dump the output definition
2191  self.pythonCfgCode += "\n# Output definition\n"
2192  self.pythonCfgCode += outputModuleCfgCode
2193 
2194  # dump all additional outputs (e.g. alca or skim streams)
2195  self.pythonCfgCode += "\n# Additional output definition\n"
2196  #I do not understand why the keys are not normally ordered.
2197  nl=sorted(self.additionalOutputs.keys())
2198  for name in nl:
2199  output = self.additionalOutputs[name]
2200  self.pythonCfgCode += "process.%s = %s" %(name, output.dumpPython())
2201  tmpOut = cms.EndPath(output)
2202  setattr(self.process,name+'OutPath',tmpOut)
2203  self.schedule.append(tmpOut)
2204 
2205  # dump all additional commands
2206  self.pythonCfgCode += "\n# Other statements\n"
2207  for command in self.additionalCommands:
2208  self.pythonCfgCode += command + "\n"
2209 
2210  #comma separated list of objects that deserve to be inlined in the configuration (typically from a modified config deep down)
2211  for object in self._options.inlineObjets.split(','):
2212  if not object:
2213  continue
2214  if not hasattr(self.process,object):
2215  print('cannot inline -'+object+'- : not known')
2216  else:
2217  self.pythonCfgCode +='\n'
2218  self.pythonCfgCode +=dumpPython(self.process,object)
2219 
2220  if self._options.pileup=='HiMixEmbGEN':
2221  self.pythonCfgCode += "\nprocess.generator.embeddingMode=cms.bool(True)\n"
2222 
2223  # dump all paths
2224  self.pythonCfgCode += "\n# Path and EndPath definitions\n"
2225  for path in self.process.paths:
2226  if getattr(self.process,path) not in self.blacklist_paths:
2227  self.pythonCfgCode += dumpPython(self.process,path)
2228 
2229  for endpath in self.process.endpaths:
2230  if getattr(self.process,endpath) not in self.blacklist_paths:
2231  self.pythonCfgCode += dumpPython(self.process,endpath)
2232 
2233  # dump the schedule
2234  self.pythonCfgCode += "\n# Schedule definition\n"
2235  result = "process.schedule = cms.Schedule("
2236 
2237  # handling of the schedule
2238  self.process.schedule = cms.Schedule()
2239  for item in self.schedule:
2240  if not isinstance(item, cms.Schedule):
2241  self.process.schedule.append(item)
2242  else:
2243  self.process.schedule.extend(item)
2244 
2245  if hasattr(self.process,"HLTSchedule"):
2246  beforeHLT = self.schedule[:self.schedule.index(self.process.HLTSchedule)]
2247  afterHLT = self.schedule[self.schedule.index(self.process.HLTSchedule)+1:]
2248  pathNames = ['process.'+p.label_() for p in beforeHLT]
2249  result += ','.join(pathNames)+')\n'
2250  result += 'process.schedule.extend(process.HLTSchedule)\n'
2251  pathNames = ['process.'+p.label_() for p in afterHLT]
2252  result += 'process.schedule.extend(['+','.join(pathNames)+'])\n'
2253  else:
2254  pathNames = ['process.'+p.label_() for p in self.schedule]
2255  result ='process.schedule = cms.Schedule('+','.join(pathNames)+')\n'
2256 
2257  self.pythonCfgCode += result
2258 
2259  for labelToAssociate in self.labelsToAssociate:
2260  self.process.schedule.associate(getattr(self.process, labelToAssociate))
2261  self.pythonCfgCode += 'process.schedule.associate(process.' + labelToAssociate + ')\n'
2262 
2263  from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
2264  associatePatAlgosToolsTask(self.process)
2265  self.pythonCfgCode+="from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask\n"
2266  self.pythonCfgCode+="associatePatAlgosToolsTask(process)\n"
2267 
2268  if self._options.nThreads != "1":
2269  self.pythonCfgCode +="\n"
2270  self.pythonCfgCode +="#Setup FWK for multithreaded\n"
2271  self.pythonCfgCode +="process.options.numberOfThreads = "+self._options.nThreads+"\n"
2272  self.pythonCfgCode +="process.options.numberOfStreams = "+self._options.nStreams+"\n"
2273  self.pythonCfgCode +="process.options.numberOfConcurrentLuminosityBlocks = "+self._options.nConcurrentLumis+"\n"
2274  self.pythonCfgCode +="process.options.eventSetup.numberOfConcurrentIOVs = "+self._options.nConcurrentIOVs+"\n"
2275  if int(self._options.nConcurrentLumis) > 1:
2276  self.pythonCfgCode +="if hasattr(process, 'DQMStore'): process.DQMStore.assertLegacySafe=cms.untracked.bool(False)\n"
2277  self.process.options.numberOfThreads = int(self._options.nThreads)
2278  self.process.options.numberOfStreams = int(self._options.nStreams)
2279  self.process.options.numberOfConcurrentLuminosityBlocks = int(self._options.nConcurrentLumis)
2280  self.process.options.eventSetup.numberOfConcurrentIOVs = int(self._options.nConcurrentIOVs)
2281  #repacked version
2282  if self._options.isRepacked:
2283  self.pythonCfgCode +="\n"
2284  self.pythonCfgCode +="from Configuration.Applications.ConfigBuilder import MassReplaceInputTag\n"
2285  self.pythonCfgCode +="MassReplaceInputTag(process, new=\"rawDataMapperByLabel\", old=\"rawDataCollector\")\n"
2286  MassReplaceInputTag(self.process, new="rawDataMapperByLabel", old="rawDataCollector")
2287 
2288  # special treatment in case of production filter sequence 2/2
2289  if self.productionFilterSequence and not (self._options.pileup=='HiMixEmbGEN'):
2290  self.pythonCfgCode +='# filter all path with the production filter sequence\n'
2291  self.pythonCfgCode +='for path in process.paths:\n'
2292  if len(self.conditionalPaths):
2293  self.pythonCfgCode +='\tif not path in %s: continue\n'%str(self.conditionalPaths)
2294  if len(self.excludedPaths):
2295  self.pythonCfgCode +='\tif path in %s: continue\n'%str(self.excludedPaths)
2296  self.pythonCfgCode +='\tgetattr(process,path).insert(0, process.%s)\n'%(self.productionFilterSequence,)
2297  pfs = getattr(self.process,self.productionFilterSequence)
2298  for path in self.process.paths:
2299  if not path in self.conditionalPaths: continue
2300  if path in self.excludedPaths: continue
2301  getattr(self.process,path).insert(0, pfs)
2302 
2303 
2304  # dump customise fragment
2305  self.pythonCfgCode += self.addCustomise()
2306 
2307  if self._options.runUnscheduled:
2308  print("--runUnscheduled is deprecated and not necessary anymore, and will be removed soon. Please update your command line.")
2309  # Keep the "unscheduled customise functions" separate for now,
2310  # there are customize functions given by users (in our unit
2311  # tests) that need to be run before the "unscheduled customise
2312  # functions"
2313  self.pythonCfgCode += self.addCustomise(1)
2314 
2315  self.pythonCfgCode += self.addCustomiseCmdLine()
2316 
2317  if hasattr(self.process,"logErrorHarvester"):
2318  #configure logErrorHarvester to wait for same EDProducers to finish as the OutputModules
2319  self.pythonCfgCode +="\n#Have logErrorHarvester wait for the same EDProducers to finish as those providing data for the OutputModule\n"
2320  self.pythonCfgCode +="from FWCore.Modules.logErrorHarvester_cff import customiseLogErrorHarvesterUsingOutputCommands\n"
2321  self.pythonCfgCode +="process = customiseLogErrorHarvesterUsingOutputCommands(process)\n"
2322  from FWCore.Modules.logErrorHarvester_cff import customiseLogErrorHarvesterUsingOutputCommands
2323  self.process = customiseLogErrorHarvesterUsingOutputCommands(self.process)
2324 
2325  # Temporary hack to put the early delete customization after
2326  # everything else
2327  #
2328  # FIXME: remove when no longer needed
2329  self.pythonCfgCode += "\n# Add early deletion of temporary data products to reduce peak memory need\n"
2330  self.pythonCfgCode += "from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete\n"
2331  self.pythonCfgCode += "process = customiseEarlyDelete(process)\n"
2332  self.pythonCfgCode += "# End adding early deletion\n"
2333  from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
2334  self.process = customiseEarlyDelete(self.process)
2335 
2336  imports = cms.specialImportRegistry.getSpecialImports()
2337  if len(imports) > 0:
2338  #need to inject this at the top
2339  index = self.pythonCfgCode.find("import FWCore.ParameterSet.Config")
2340  #now find the end of line
2341  index = self.pythonCfgCode.find("\n",index)
2342  self.pythonCfgCode = self.pythonCfgCode[:index]+ "\n" + "\n".join(imports)+"\n" +self.pythonCfgCode[index:]
2343 
2344 
2345  # make the .io file
2346 
2347  if self._options.io:
2348  #io=open(self._options.python_filename.replace('.py','.io'),'w')
2349  if not self._options.io.endswith('.io'): self._option.io+='.io'
2350  io=open(self._options.io,'w')
2351  ioJson={}
2352  if hasattr(self.process.source,"fileNames"):
2353  if len(self.process.source.fileNames.value()):
2354  ioJson['primary']=self.process.source.fileNames.value()
2355  if hasattr(self.process.source,"secondaryFileNames"):
2356  if len(self.process.source.secondaryFileNames.value()):
2357  ioJson['secondary']=self.process.source.secondaryFileNames.value()
2358  if self._options.pileup_input and (self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:')):
2359  ioJson['pileup']=self._options.pileup_input[4:]
2360  for (o,om) in self.process.outputModules_().items():
2361  ioJson[o]=om.fileName.value()
2362  ioJson['GT']=self.process.GlobalTag.globaltag.value()
2363  if self.productionFilterSequence:
2364  ioJson['filter']=self.productionFilterSequence
2365  import json
2366  io.write(json.dumps(ioJson))
2367  return
2368 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addCommon(), ConfigBuilder.ConfigBuilder.addConditions(), ConfigBuilder.ConfigBuilder.addCustomise(), ConfigBuilder.ConfigBuilder.addCustomiseCmdLine(), ConfigBuilder.ConfigBuilder.addedObjects, ConfigBuilder.ConfigBuilder.additionalCommands, ConfigBuilder.ConfigBuilder.additionalOutputs, ConfigBuilder.ConfigBuilder.addMaxEvents(), ConfigBuilder.ConfigBuilder.addOutput(), ConfigBuilder.ConfigBuilder.addSource(), ConfigBuilder.ConfigBuilder.addStandardSequences(), mps_setup.append, helpers.associatePatAlgosToolsTask(), ConfigBuilder.ConfigBuilder.blacklist_paths, ConfigBuilder.ConfigBuilder.build_production_info(), ConfigBuilder.ConfigBuilder.completeInputCommand(), ConfigBuilder.ConfigBuilder.conditionalPaths, earlyDeleteSettings_cff.customiseEarlyDelete(), logErrorHarvester_cff.customiseLogErrorHarvesterUsingOutputCommands(), ConfigBuilder.dumpPython(), ConfigBuilder.ConfigBuilder.EVTCONTDefaultCFF, ConfigBuilder.ConfigBuilder.excludedPaths, spr.find(), ConfigBuilder.ConfigBuilder.imports, edm::eventsetup::heterocontainer.insert(), createfilelist.int, mps_monitormerge.items, join(), relativeConstraints.keys, ConfigBuilder.ConfigBuilder.labelsToAssociate, ConfigBuilder.ConfigBuilder.loadAndRemember(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.productionFilterSequence, ConfigBuilder.ConfigBuilder.pythonCfgCode, ConfigBuilder.ConfigBuilder.schedule, ConfigBuilder.ConfigBuilder.stepMap, str, ConfigBuilder.ConfigBuilder.with_input, and ConfigBuilder.ConfigBuilder.with_output.

◆ prepare_ALCA()

def ConfigBuilder.ConfigBuilder.prepare_ALCA (   self,
  sequence = None,
  workflow = 'full' 
)
Enrich the process with alca streams 

Definition at line 1271 of file ConfigBuilder.py.

1271  def prepare_ALCA(self, sequence = None, workflow = 'full'):
1272  """ Enrich the process with alca streams """
1273  alcaConfig=self.loadDefaultOrSpecifiedCFF(sequence,self.ALCADefaultCFF)
1274  sequence = sequence.split('.')[-1]
1275 
1276  # decide which ALCA paths to use
1277  alcaList = sequence.split("+")
1278  maxLevel=0
1279  from Configuration.AlCa.autoAlca import autoAlca
1280  # support @X from autoAlca.py, and recursion support: i.e T0:@Mu+@EG+...
1281  self.expandMapping(alcaList,autoAlca)
1282  self.AlCaPaths=[]
1283  for name in alcaConfig.__dict__:
1284  alcastream = getattr(alcaConfig,name)
1285  shortName = name.replace('ALCARECOStream','')
1286  if shortName in alcaList and isinstance(alcastream,cms.FilteredStream):
1287  isNano = (alcastream.dataTier == "NANOAOD")
1288  output = self.addExtraStream(name, alcastream, workflow=workflow,
1289  cppType=("NanoAODOutputModule" if isNano else "PoolOutputModule"))
1290  self.executeAndRemember('process.ALCARECOEventContent.outputCommands.extend(process.OutALCARECO'+shortName+'_noDrop.outputCommands)')
1291  self.AlCaPaths.append(shortName)
1292  if 'DQM' in alcaList and not isNano:
1293  if not self._options.inlineEventContent and hasattr(self.process,name):
1294  self.executeAndRemember('process.' + name + '.outputCommands.append("keep *_MEtoEDMConverter_*_*")')
1295  else:
1296  output.outputCommands.append("keep *_MEtoEDMConverter_*_*")
1297 
1298  #rename the HLT process name in the alca modules
1299  if self._options.hltProcess or 'HLT' in self.stepMap:
1300  if isinstance(alcastream.paths,tuple):
1301  for path in alcastream.paths:
1302  self.renameHLTprocessInSequence(path.label())
1303  else:
1304  self.renameHLTprocessInSequence(alcastream.paths.label())
1305 
1306  for i in range(alcaList.count(shortName)):
1307  alcaList.remove(shortName)
1308 
1309  # DQM needs a special handling
1310  elif name == 'pathALCARECODQM' and 'DQM' in alcaList:
1311  path = getattr(alcaConfig,name)
1312  self.schedule.append(path)
1313  alcaList.remove('DQM')
1314 
1315  if isinstance(alcastream,cms.Path):
1316  #black list the alca path so that they do not appear in the cfg
1317  self.blacklist_paths.append(alcastream)
1318 
1319 
1320  if len(alcaList) != 0:
1321  available=[]
1322  for name in alcaConfig.__dict__:
1323  alcastream = getattr(alcaConfig,name)
1324  if isinstance(alcastream,cms.FilteredStream):
1325  available.append(name.replace('ALCARECOStream',''))
1326  print("The following alcas could not be found "+str(alcaList))
1327  print("available ",available)
1328  #print "verify your configuration, ignoring for now"
1329  raise Exception("The following alcas could not be found "+str(alcaList))
1330 

References ConfigBuilder.ConfigBuilder.ALCADefaultCFF, ConfigBuilder.ConfigBuilder.AlCaPaths, ConfigBuilder.ConfigBuilder.expandMapping(), and ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAOUTPUT(), and ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER().

◆ prepare_ALCAHARVEST()

def ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST (   self,
  sequence = None 
)
Enrich the process with AlCaHarvesting step 

Definition at line 2051 of file ConfigBuilder.py.

2051  def prepare_ALCAHARVEST(self, sequence = None):
2052  """ Enrich the process with AlCaHarvesting step """
2053  harvestingConfig = self.loadAndRemember(self.ALCAHARVESTDefaultCFF)
2054  sequence=sequence.split(".")[-1]
2055 
2056  # decide which AlcaHARVESTING paths to use
2057  harvestingList = sequence.split("+")
2058 
2059 
2060 
2061  from Configuration.AlCa.autoPCL import autoPCL
2062  self.expandMapping(harvestingList,autoPCL)
2063 
2064  for name in harvestingConfig.__dict__:
2065  harvestingstream = getattr(harvestingConfig,name)
2066  if name in harvestingList and isinstance(harvestingstream,cms.Path):
2067  self.schedule.append(harvestingstream)
2068  if isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_dbOutput"), cms.VPSet) and \
2069  isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_metadata"), cms.VPSet):
2070  self.executeAndRemember("process.PoolDBOutputService.toPut.extend(process.ALCAHARVEST" + name + "_dbOutput)")
2071  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.extend(process.ALCAHARVEST" + name + "_metadata)")
2072  else:
2073  self.executeAndRemember("process.PoolDBOutputService.toPut.append(process.ALCAHARVEST" + name + "_dbOutput)")
2074  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVEST" + name + "_metadata)")
2075  harvestingList.remove(name)
2076  # append the common part at the end of the sequence
2077  lastStep = getattr(harvestingConfig,"ALCAHARVESTDQMSaveAndMetadataWriter")
2078  self.schedule.append(lastStep)
2079 
2080  if len(harvestingList) != 0 and 'dummyHarvesting' not in harvestingList :
2081  print("The following harvesting could not be found : ", harvestingList)
2082  raise Exception("The following harvesting could not be found : "+str(harvestingList))
2083 
2084 
2085 

References ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultCFF, mps_setup.append, ConfigBuilder.ConfigBuilder.executeAndRemember(), ConfigBuilder.ConfigBuilder.expandMapping(), ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.prepare_ENDJOB(), print(), ConfigBuilder.ConfigBuilder.schedule, and str.

◆ prepare_ALCAOUTPUT()

def ConfigBuilder.ConfigBuilder.prepare_ALCAOUTPUT (   self,
  sequence = None 
)

Definition at line 1268 of file ConfigBuilder.py.

1268  def prepare_ALCAOUTPUT(self, sequence = None):
1269  self.prepare_ALCA(sequence, workflow = "output")
1270 

References ConfigBuilder.ConfigBuilder.prepare_ALCA().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER().

◆ prepare_ALCAPRODUCER()

def ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER (   self,
  sequence = None 
)

Definition at line 1265 of file ConfigBuilder.py.

1265  def prepare_ALCAPRODUCER(self, sequence = None):
1266  self.prepare_ALCA(sequence, workflow = "producers")
1267 

References ConfigBuilder.ConfigBuilder.prepare_ALCA(), and ConfigBuilder.ConfigBuilder.prepare_ALCAOUTPUT().

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

◆ prepare_CFWRITER()

def ConfigBuilder.ConfigBuilder.prepare_CFWRITER (   self,
  sequence = None 
)
Enrich the schedule with the crossing frame writer step

Definition at line 1468 of file ConfigBuilder.py.

1468  def prepare_CFWRITER(self, sequence = None):
1469  """ Enrich the schedule with the crossing frame writer step"""
1470  self.loadAndRemember(self.CFWRITERDefaultCFF)
1471  self.scheduleSequence('pcfw','cfwriter_step')
1472  return
1473 

References ConfigBuilder.ConfigBuilder.CFWRITERDefaultCFF, ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.prepare_DATAMIX(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI().

◆ prepare_DATAMIX()

def ConfigBuilder.ConfigBuilder.prepare_DATAMIX (   self,
  sequence = None 
)
Enrich the schedule with the digitisation step

Definition at line 1474 of file ConfigBuilder.py.

1474  def prepare_DATAMIX(self, sequence = None):
1475  """ Enrich the schedule with the digitisation step"""
1476  self.loadAndRemember(self.DATAMIXDefaultCFF)
1477  self.scheduleSequence('pdatamix','datamixing_step')
1478 
1479  if self._options.pileup_input:
1480  theFiles=''
1481  if self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:'):
1482  theFiles=filesFromDASQuery('file dataset = %s'%(self._options.pileup_input[4:],),self._options.pileup_dasoption)[0]
1483  elif self._options.pileup_input.startswith("filelist:"):
1484  theFiles= (filesFromList(self._options.pileup_input[9:]))[0]
1485  else:
1486  theFiles=self._options.pileup_input.split(',')
1487  #print theFiles
1488  self.executeAndRemember( "process.mixData.input.fileNames = cms.untracked.vstring(%s)"%( theFiles ) )
1489 
1490  return
1491 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.DATAMIXDefaultCFF, ConfigBuilder.ConfigBuilder.executeAndRemember(), ConfigBuilder.filesFromDASQuery(), ConfigBuilder.filesFromList(), ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_CFWRITER().

◆ prepare_DIGI()

def ConfigBuilder.ConfigBuilder.prepare_DIGI (   self,
  sequence = None 
)
Enrich the schedule with the digitisation step

Definition at line 1448 of file ConfigBuilder.py.

1448  def prepare_DIGI(self, sequence = None):
1449  """ Enrich the schedule with the digitisation step"""
1450  self.loadDefaultOrSpecifiedCFF(sequence,self.DIGIDefaultCFF)
1451 
1452  if self._options.gflash==True:
1453  self.loadAndRemember("Configuration/StandardSequences/GFlashDIGI_cff")
1454 
1455  if sequence == 'pdigi_valid' or sequence == 'pdigi_hi':
1456  self.executeAndRemember("process.mix.digitizers = cms.PSet(process.theDigitizersValid)")
1457 
1458  if sequence != 'pdigi_nogen' and sequence != 'pdigi_valid_nogen' and sequence != 'pdigi_hi_nogen' and not self.process.source.type_()=='EmptySource' and not self._options.filetype == "LHE":
1459  if self._options.inputEventContent=='':
1460  self._options.inputEventContent='REGEN'
1461  else:
1462  self._options.inputEventContent=self._options.inputEventContent+',REGEN'
1463 
1464 
1465  self.scheduleSequence(sequence.split('.')[-1],'digitisation_step')
1466  return
1467 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.DIGIDefaultCFF, ConfigBuilder.ConfigBuilder.executeAndRemember(), ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_CFWRITER(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_SIM().

◆ prepare_DIGI2RAW()

def ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW (   self,
  sequence = None 
)

Definition at line 1492 of file ConfigBuilder.py.

1492  def prepare_DIGI2RAW(self, sequence = None):
1493  self.loadDefaultOrSpecifiedCFF(sequence,self.DIGI2RAWDefaultCFF)
1494  self.scheduleSequence(sequence.split('.')[-1],'digi2raw_step')
1495  return
1496 

References ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultCFF, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_REPACK(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_DATAMIX().

◆ prepare_DQM()

def ConfigBuilder.ConfigBuilder.prepare_DQM (   self,
  sequence = 'DQMOffline' 
)

Definition at line 1970 of file ConfigBuilder.py.

1970  def prepare_DQM(self, sequence = 'DQMOffline'):
1971  # this one needs replacement
1972 
1973  # any 'DQM' job should use DQMStore in non-legacy mode (but not HARVESTING)
1974  self.loadAndRemember("DQMServices/Core/DQMStoreNonLegacy_cff")
1975  self.loadDefaultOrSpecifiedCFF(sequence,self.DQMOFFLINEDefaultCFF)
1976  sequenceList=sequence.split('.')[-1].split('+')
1977  postSequenceList=sequence.split('.')[-1].split('+')
1978  from DQMOffline.Configuration.autoDQM import autoDQM
1979  self.expandMapping(sequenceList,autoDQM,index=0)
1980  self.expandMapping(postSequenceList,autoDQM,index=1)
1981 
1982  if len(set(sequenceList))!=len(sequenceList):
1983  sequenceList=list(set(sequenceList))
1984  print("Duplicate entries for DQM:, using",sequenceList)
1985 
1986  pathName='dqmoffline_step'
1987  for (i,sequence) in enumerate(sequenceList):
1988  if (i!=0):
1989  pathName='dqmoffline_%d_step'%(i)
1990 
1991  if 'HLT' in self.stepMap.keys() or self._options.hltProcess:
1992  self.renameHLTprocessInSequence(sequence)
1993 
1994  setattr(self.process,pathName, cms.EndPath( getattr(self.process,sequence ) ) )
1995  self.schedule.append(getattr(self.process,pathName))
1996 
1997  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
1998  #will get in the schedule, smoothly
1999  getattr(self.process,pathName).insert(0,self.process.genstepfilter)
2000 
2001 
2002  pathName='dqmofflineOnPAT_step'
2003  for (i,sequence) in enumerate(postSequenceList):
2004  #Fix needed to avoid duplication of sequences not defined in autoDQM or without a PostDQM
2005  if (sequenceList[i]==postSequenceList[i]):
2006  continue
2007  if (i!=0):
2008  pathName='dqmofflineOnPAT_%d_step'%(i)
2009 
2010  setattr(self.process,pathName, cms.EndPath( getattr(self.process, sequence ) ) )
2011  self.schedule.append(getattr(self.process,pathName))
2012 

References ConfigBuilder.ConfigBuilder._options, mps_setup.append, ConfigBuilder.ConfigBuilder.DQMOFFLINEDefaultCFF, ConfigBuilder.ConfigBuilder.expandMapping(), edm::eventsetup::heterocontainer.insert(), relativeConstraints.keys, ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_HARVESTING(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.schedule, submitPVValidationJobs.split(), and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.expandMapping().

◆ prepare_EI()

def ConfigBuilder.ConfigBuilder.prepare_EI (   self,
  sequence = None 
)
Enrich the schedule with event interpretation 

Definition at line 1728 of file ConfigBuilder.py.

1728  def prepare_EI(self, sequence = None):
1729  ''' Enrich the schedule with event interpretation '''
1730  from Configuration.StandardSequences.EventInterpretation import EventInterpretation
1731  if sequence in EventInterpretation:
1732  self.EIDefaultCFF = EventInterpretation[sequence]
1733  sequence = 'EIsequence'
1734  else:
1735  raise Exception('Cannot set %s event interpretation'%( sequence) )
1736  self.loadDefaultOrSpecifiedCFF(sequence,self.EIDefaultCFF)
1737  self.scheduleSequence(sequence.split('.')[-1],'eventinterpretaion_step')
1738  return
1739 

References ConfigBuilder.ConfigBuilder.EIDefaultCFF, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_SKIM(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANOGEN().

◆ prepare_ENDJOB()

def ConfigBuilder.ConfigBuilder.prepare_ENDJOB (   self,
  sequence = 'endOfProcess' 
)

Definition at line 2086 of file ConfigBuilder.py.

2086  def prepare_ENDJOB(self, sequence = 'endOfProcess'):
2087  self.loadDefaultOrSpecifiedCFF(sequence,self.ENDJOBDefaultCFF)
2088  self.scheduleSequenceAtEnd(sequence.split('.')[-1],'endjob_step')
2089  return
2090 

References ConfigBuilder.ConfigBuilder.ENDJOBDefaultCFF, ConfigBuilder.ConfigBuilder.finalizeFastSimHLT(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), and ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

◆ prepare_FILTER()

def ConfigBuilder.ConfigBuilder.prepare_FILTER (   self,
  sequence = None 
)
Enrich the schedule with a user defined filter sequence 

Definition at line 1620 of file ConfigBuilder.py.

1620  def prepare_FILTER(self, sequence = None):
1621  ''' Enrich the schedule with a user defined filter sequence '''
1622 
1623  filterConfig=self.load(sequence.split('.')[0])
1624  filterSeq=sequence.split('.')[-1]
1625 
1626  class PrintAllModules(object):
1627  def __init__(self):
1628  self.inliner=''
1629  pass
1630  def enter(self,visitee):
1631  try:
1632  label=visitee.label()
1633 
1634  self.inliner=label+','+self.inliner
1635  except:
1636  pass
1637  def leave(self,v): pass
1638 
1639  expander=PrintAllModules()
1640  getattr(self.process,filterSeq).visit( expander )
1641  self._options.inlineObjets+=','+expander.inliner
1642  self._options.inlineObjets+=','+filterSeq
1643 
1644 
1645  self.scheduleSequence(filterSeq,'filtering_step')
1646  self.nextScheduleIsConditional=True
1647 
1648  self.productionFilterSequence = filterSeq
1649 
1650  return
1651 

References ConfigBuilder.ConfigBuilder.__init__(), ConfigBuilder.ConfigBuilder.inliner, VisualizationOptions.load(), BTagCalibrationReader::BTagCalibrationReaderImpl.load(), BTagCalibrationReader.load(), cond::persistency::GTEditor.load(), L1MuDTPtaLut.load(), cond::persistency::IOVEditor.load(), L1MuDTPhiLut.load(), L1MuDTEtaPatternLut.load(), L1MuDTQualPatternLut.load(), PiecewiseScalingPolynomial.load(), L1MuDTExtLut.load(), HBHENegativeEFilter.load(), HBHEChannelGroups.load(), cond::persistency::RunInfoProxy.load(), HcalIndexLookup.load(), cond::persistency::GTProxy.load(), cond::persistency::IOVProxy.load(), OOTPileupCorrData.load(), TrackerMap.load(), ConfigBuilder.ConfigBuilder.load(), tkal_create_file_lists._DasCache.load(), and resolutioncreator_cfi.object.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1TrackTrigger().

◆ prepare_GEN()

def ConfigBuilder.ConfigBuilder.prepare_GEN (   self,
  sequence = None 
)
load the fragment of generator configuration 

Definition at line 1348 of file ConfigBuilder.py.

1348  def prepare_GEN(self, sequence = None):
1349  """ load the fragment of generator configuration """
1350  loadFailure=False
1351  #remove trailing .py
1352  #support old style .cfi by changing into something.cfi into something_cfi
1353  #remove python/ from the name
1354  loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','')
1355  #standard location of fragments
1356  if not '/' in loadFragment:
1357  loadFragment='Configuration.Generator.'+loadFragment
1358  else:
1359  loadFragment=loadFragment.replace('/','.')
1360  try:
1361  print("Loading generator fragment from",loadFragment)
1362  __import__(loadFragment)
1363  except:
1364  loadFailure=True
1365  #if self.process.source and self.process.source.type_()=='EmptySource':
1366  if not (self._options.filein or self._options.dasquery):
1367  raise Exception("Neither gen fragment of input files provided: this is an inconsistent GEN step configuration")
1368 
1369  if not loadFailure:
1370  generatorModule=sys.modules[loadFragment]
1371  genModules=generatorModule.__dict__
1372  #remove lhe producer module since this should have been
1373  #imported instead in the LHE step
1374  if self.LHEDefaultSeq in genModules:
1375  del genModules[self.LHEDefaultSeq]
1376 
1377  if self._options.hideGen:
1378  self.loadAndRemember(loadFragment)
1379  else:
1380  self.process.load(loadFragment)
1381  # expose the objects from that fragment to the configuration
1382  import FWCore.ParameterSet.Modules as cmstypes
1383  for name in genModules:
1384  theObject = getattr(generatorModule,name)
1385  if isinstance(theObject, cmstypes._Module):
1386  self._options.inlineObjets=name+','+self._options.inlineObjets
1387  elif isinstance(theObject, cms.Sequence) or isinstance(theObject, cmstypes.ESProducer):
1388  self._options.inlineObjets+=','+name
1389 
1390  if sequence == self.GENDefaultSeq or sequence == 'pgen_genonly':
1391  if 'ProductionFilterSequence' in genModules and ('generator' in genModules):
1392  self.productionFilterSequence = 'ProductionFilterSequence'
1393  elif 'generator' in genModules:
1394  self.productionFilterSequence = 'generator'
1395 
1396  """ Enrich the schedule with the rest of the generation step """
1397  self.loadDefaultOrSpecifiedCFF(sequence,self.GENDefaultCFF)
1398  genSeqName=sequence.split('.')[-1]
1399 
1400  if True:
1401  try:
1402  from Configuration.StandardSequences.VtxSmeared import VtxSmeared
1403  cffToBeLoaded=VtxSmeared[self._options.beamspot]
1404  self.loadAndRemember(cffToBeLoaded)
1405  except ImportError:
1406  raise Exception("VertexSmearing type or beamspot "+self._options.beamspot+" unknown.")
1407 
1408  if self._options.scenario == 'HeavyIons':
1409  if self._options.pileup=='HiMixGEN':
1410  self.loadAndRemember("Configuration/StandardSequences/GeneratorMix_cff")
1411  elif self._options.pileup=='HiMixEmbGEN':
1412  self.loadAndRemember("Configuration/StandardSequences/GeneratorEmbMix_cff")
1413  else:
1414  self.loadAndRemember("Configuration/StandardSequences/GeneratorHI_cff")
1415 
1416  self.process.generation_step = cms.Path( getattr(self.process,genSeqName) )
1417  self.schedule.append(self.process.generation_step)
1418 
1419  #register to the genstepfilter the name of the path (static right now, but might evolve)
1420  self.executeAndRemember('process.genstepfilter.triggerConditions=cms.vstring("generation_step")')
1421 
1422  if 'reGEN' in self.stepMap:
1423  #stop here
1424  return
1425 
1426  """ Enrich the schedule with the summary of the filter step """
1427  #the gen filter in the endpath
1428  self.loadAndRemember("GeneratorInterface/Core/genFilterSummary_cff")
1429  self.scheduleSequenceAtEnd('genFilterSummary','genfiltersummary_step')
1430  return
1431 

References ConfigBuilder.ConfigBuilder._options, mps_setup.append, ConfigBuilder.ConfigBuilder.executeAndRemember(), ConfigBuilder.ConfigBuilder.GENDefaultCFF, ConfigBuilder.ConfigBuilder.GENDefaultSeq, ConfigBuilder.ConfigBuilder.LHEDefaultSeq, ConfigBuilder.ConfigBuilder.load(), ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_SIM(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.productionFilterSequence, python.rootplot.root2matplotlib.replace(), ConfigBuilder.ConfigBuilder.schedule, ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd(), and ConfigBuilder.ConfigBuilder.stepMap.

◆ prepare_HARVESTING()

def ConfigBuilder.ConfigBuilder.prepare_HARVESTING (   self,
  sequence = None 
)
Enrich the process with harvesting step 

Definition at line 2013 of file ConfigBuilder.py.

2013  def prepare_HARVESTING(self, sequence = None):
2014  """ Enrich the process with harvesting step """
2015  self.DQMSaverCFF='Configuration/StandardSequences/DQMSaver'+self._options.harvesting+'_cff'
2016  self.loadAndRemember(self.DQMSaverCFF)
2017 
2018  harvestingConfig = self.loadDefaultOrSpecifiedCFF(sequence,self.HARVESTINGDefaultCFF)
2019  sequence = sequence.split('.')[-1]
2020 
2021  # decide which HARVESTING paths to use
2022  harvestingList = sequence.split("+")
2023  from DQMOffline.Configuration.autoDQM import autoDQM
2024  from Validation.Configuration.autoValidation import autoValidation
2025  import copy
2026  combined_mapping = copy.deepcopy( autoDQM )
2027  combined_mapping.update( autoValidation )
2028  self.expandMapping(harvestingList,combined_mapping,index=-1)
2029 
2030  if len(set(harvestingList))!=len(harvestingList):
2031  harvestingList=list(set(harvestingList))
2032  print("Duplicate entries for HARVESTING, using",harvestingList)
2033 
2034  for name in harvestingList:
2035  if not name in harvestingConfig.__dict__:
2036  print(name,"is not a possible harvesting type. Available are",harvestingConfig.__dict__.keys())
2037  # trigger hard error, like for other sequence types
2038  getattr(self.process, name)
2039  continue
2040  harvestingstream = getattr(harvestingConfig,name)
2041  if isinstance(harvestingstream,cms.Path):
2042  self.schedule.append(harvestingstream)
2043  self.blacklist_paths.append(harvestingstream)
2044  if isinstance(harvestingstream,cms.Sequence):
2045  setattr(self.process,name+"_step",cms.Path(harvestingstream))
2046  self.schedule.append(getattr(self.process,name+"_step"))
2047 
2048  self.scheduleSequence('DQMSaver','dqmsave_step')
2049  return
2050 

References ConfigBuilder.ConfigBuilder._options, and ConfigBuilder.ConfigBuilder.DQMSaverCFF.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

◆ prepare_HLT()

def ConfigBuilder.ConfigBuilder.prepare_HLT (   self,
  sequence = None 
)
Enrich the schedule with the HLT simulation step

Definition at line 1522 of file ConfigBuilder.py.

1522  def prepare_HLT(self, sequence = None):
1523  """ Enrich the schedule with the HLT simulation step"""
1524  if not sequence:
1525  print("no specification of the hlt menu has been given, should never happen")
1526  raise Exception('no HLT sequence provided')
1527 
1528  if '@' in sequence:
1529  # case where HLT:@something was provided
1530  from Configuration.HLT.autoHLT import autoHLT
1531  key = sequence[1:]
1532  if key in autoHLT:
1533  sequence = autoHLT[key]
1534  else:
1535  raise ValueError('no HLT mapping key "%s" found in autoHLT' % key)
1536 
1537  if ',' in sequence:
1538  #case where HLT:something:something was provided
1539  self.executeAndRemember('import HLTrigger.Configuration.Utilities')
1540  optionsForHLT = {}
1541  if self._options.scenario == 'HeavyIons':
1542  optionsForHLT['type'] = 'HIon'
1543  else:
1544  optionsForHLT['type'] = 'GRun'
1545  optionsForHLTConfig = ', '.join('%s=%s' % (key, repr(val)) for (key, val) in optionsForHLT.items())
1546  if sequence == 'run,fromSource':
1547  if hasattr(self.process.source,'firstRun'):
1548  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.firstRun.value()),%s)'%(optionsForHLTConfig))
1549  elif hasattr(self.process.source,'setRunNumber'):
1550  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.setRunNumber.value()),%s)'%(optionsForHLTConfig))
1551  else:
1552  raise Exception('Cannot replace menu to load %s'%(sequence))
1553  else:
1554  self.executeAndRemember('process.loadHltConfiguration("%s",%s)'%(sequence.replace(',',':'),optionsForHLTConfig))
1555  else:
1556  self.loadAndRemember('HLTrigger/Configuration/HLT_%s_cff' % sequence)
1557 
1558  if self._options.isMC:
1559  self._options.customisation_file.append("HLTrigger/Configuration/customizeHLTforMC.customizeHLTforMC")
1560 
1561  if self._options.name != 'HLT':
1562  self.additionalCommands.append('from HLTrigger.Configuration.CustomConfigs import ProcessName')
1563  self.additionalCommands.append('process = ProcessName(process)')
1564  self.additionalCommands.append('')
1565  from HLTrigger.Configuration.CustomConfigs import ProcessName
1566  self.process = ProcessName(self.process)
1567 
1568  self.schedule.append(self.process.HLTSchedule)
1569  [self.blacklist_paths.append(path) for path in self.process.HLTSchedule if isinstance(path,(cms.Path,cms.EndPath))]
1570 
1571  #this is a fake, to be removed with fastim migration and HLT menu dump
1572  if self._options.fast:
1573  if not hasattr(self.process,'HLTEndSequence'):
1574  self.executeAndRemember("process.HLTEndSequence = cms.Sequence( process.dummyModule )")
1575 
1576 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.additionalCommands, mps_setup.append, ConfigBuilder.ConfigBuilder.blacklist_paths, ConfigBuilder.ConfigBuilder.executeAndRemember(), join(), ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.prepare_RAW2RECO(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, CustomConfigs.ProcessName(), and ConfigBuilder.ConfigBuilder.schedule.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1REPACK().

◆ prepare_L1()

def ConfigBuilder.ConfigBuilder.prepare_L1 (   self,
  sequence = None 
)
Enrich the schedule with the L1 simulation step

Definition at line 1502 of file ConfigBuilder.py.

1502  def prepare_L1(self, sequence = None):
1503  """ Enrich the schedule with the L1 simulation step"""
1504  assert(sequence == None)
1505  self.loadAndRemember(self.L1EMDefaultCFF)
1506  self.scheduleSequence('SimL1Emulator','L1simulation_step')
1507  return
1508 

References cms::cuda.assert(), ConfigBuilder.ConfigBuilder.L1EMDefaultCFF, ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.prepare_L1REPACK(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_REPACK().

◆ prepare_L1HwVal()

def ConfigBuilder.ConfigBuilder.prepare_L1HwVal (   self,
  sequence = 'L1HwVal' 
)
Enrich the schedule with L1 HW validation 

Definition at line 1601 of file ConfigBuilder.py.

1601  def prepare_L1HwVal(self, sequence = 'L1HwVal'):
1602  ''' Enrich the schedule with L1 HW validation '''
1603  self.loadDefaultOrSpecifiedCFF(sequence,self.L1HwValDefaultCFF)
1604  #self.scheduleSequence(sequence.split('.')[-1],'l1hwval_step')
1605  print('\n\n\n DEPRECATED this has no action \n\n\n')
1606  return
1607 

References ConfigBuilder.ConfigBuilder.L1HwValDefaultCFF, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_L1Reco(), and print().

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATFILTER().

◆ prepare_L1Reco()

def ConfigBuilder.ConfigBuilder.prepare_L1Reco (   self,
  sequence = "L1Reco" 
)
Enrich the schedule with L1 reconstruction 

Definition at line 1608 of file ConfigBuilder.py.

1608  def prepare_L1Reco(self, sequence = "L1Reco"):
1609  ''' Enrich the schedule with L1 reconstruction '''
1610  self.loadDefaultOrSpecifiedCFF(sequence,self.L1RecoDefaultCFF)
1611  self.scheduleSequence(sequence.split('.')[-1],'L1Reco_step')
1612  return
1613 

References ConfigBuilder.ConfigBuilder.L1RecoDefaultCFF, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_L1TrackTrigger(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1HwVal().

◆ prepare_L1REPACK()

def ConfigBuilder.ConfigBuilder.prepare_L1REPACK (   self,
  sequence = None 
)
Enrich the schedule with the L1 simulation step, running the L1 emulator on data unpacked from the RAW collection, and repacking the result in a new RAW collection

Definition at line 1509 of file ConfigBuilder.py.

1509  def prepare_L1REPACK(self, sequence = None):
1510  """ Enrich the schedule with the L1 simulation step, running the L1 emulator on data unpacked from the RAW collection, and repacking the result in a new RAW collection"""
1511  supported = ['GT','GT1','GT2','GCTGT','Full','FullSimTP','FullMC','Full2015Data','uGT','CalouGT']
1512  if sequence in supported:
1513  self.loadAndRemember('Configuration/StandardSequences/SimL1EmulatorRepack_%s_cff'%sequence)
1514  if self._options.scenario == 'HeavyIons':
1515  self.renameInputTagsInSequence("SimL1Emulator","rawDataCollector","rawDataRepacker")
1516  self.scheduleSequence('SimL1Emulator','L1RePack_step')
1517  else:
1518  print("L1REPACK with '",sequence,"' is not supported! Supported choices are: ",supported)
1519  raise Exception('unsupported feature')
1520 
1521 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.prepare_HLT(), print(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1().

◆ prepare_L1TrackTrigger()

def ConfigBuilder.ConfigBuilder.prepare_L1TrackTrigger (   self,
  sequence = "L1TrackTrigger" 
)
Enrich the schedule with L1 reconstruction 

Definition at line 1614 of file ConfigBuilder.py.

1614  def prepare_L1TrackTrigger(self, sequence = "L1TrackTrigger"):
1615  ''' Enrich the schedule with L1 reconstruction '''
1616  self.loadDefaultOrSpecifiedCFF(sequence,self.L1TrackTriggerDefaultCFF)
1617  self.scheduleSequence(sequence.split('.')[-1],'L1TrackTrigger_step')
1618  return
1619 

References ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultCFF, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_FILTER(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1Reco().

◆ prepare_LHE()

def ConfigBuilder.ConfigBuilder.prepare_LHE (   self,
  sequence = None 
)

Definition at line 1331 of file ConfigBuilder.py.

1331  def prepare_LHE(self, sequence = None):
1332  #load the fragment
1333 
1334  loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','').replace('/','.')
1335  print("Loading lhe fragment from",loadFragment)
1336  __import__(loadFragment)
1337  self.process.load(loadFragment)
1338 
1339  self._options.inlineObjets+=','+sequence
1340 
1341  getattr(self.process,sequence).nEvents = int(self._options.number)
1342 
1343  #schedule it
1344  self.process.lhe_step = cms.Path( getattr( self.process,sequence) )
1345  self.excludedPaths.append("lhe_step")
1346  self.schedule.append( self.process.lhe_step )
1347 

◆ prepare_NANO()

def ConfigBuilder.ConfigBuilder.prepare_NANO (   self,
  sequence = "nanoAOD" 
)
Enrich the schedule with NANO 

Definition at line 1705 of file ConfigBuilder.py.

1705  def prepare_NANO(self, sequence = "nanoAOD"):
1706  ''' Enrich the schedule with NANO '''
1707  self.loadDefaultOrSpecifiedCFF(sequence,self.NANODefaultCFF)
1708  self.scheduleSequence(sequence.split('.')[-1],'nanoAOD_step')
1709  custom = "nanoAOD_customizeData" if self._options.isData else "nanoAOD_customizeMC"
1710  self._options.customisation_file.insert(0,"PhysicsTools/NanoAOD/nano_cff."+custom)
1711  if self._options.hltProcess:
1712  if len(self._options.customise_commands) > 1:
1713  self._options.customise_commands = self._options.customise_commands + " \n"
1714  self._options.customise_commands = self._options.customise_commands + "process.unpackedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1715 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.NANODefaultCFF, ConfigBuilder.ConfigBuilder.prepare_NANOGEN(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

◆ prepare_NANOGEN()

def ConfigBuilder.ConfigBuilder.prepare_NANOGEN (   self,
  sequence = "nanoAOD" 
)
Enrich the schedule with NANOGEN 

Definition at line 1716 of file ConfigBuilder.py.

1716  def prepare_NANOGEN(self, sequence = "nanoAOD"):
1717  ''' Enrich the schedule with NANOGEN '''
1718  # TODO: Need to modify this based on the input file type
1719  fromGen = any([x in self.stepMap for x in ['LHE', 'GEN', 'AOD']])
1720  self.loadDefaultOrSpecifiedCFF(sequence,self.NANOGENDefaultCFF)
1721  self.scheduleSequence(sequence.split('.')[-1],'nanoAOD_step')
1722  custom = "customizeNanoGEN" if fromGen else "customizeNanoGENFromMini"
1723  if self._options.runUnscheduled:
1724  self._options.customisation_file_unsch.insert(0, '.'.join([self.NANOGENDefaultCFF, custom]))
1725  else:
1726  self._options.customisation_file.insert(0, '.'.join([self.NANOGENDefaultCFF, custom]))
1727 

References ConfigBuilder.ConfigBuilder._options, any(), join(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.NANOGENDefaultCFF, ConfigBuilder.ConfigBuilder.prepare_EI(), ConfigBuilder.ConfigBuilder.scheduleSequence(), and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ prepare_PAT()

def ConfigBuilder.ConfigBuilder.prepare_PAT (   self,
  sequence = "miniAOD" 
)
Enrich the schedule with PAT 

Definition at line 1673 of file ConfigBuilder.py.

1673  def prepare_PAT(self, sequence = "miniAOD"):
1674  ''' Enrich the schedule with PAT '''
1675  self.prepare_PATFILTER(self)
1676  self.loadDefaultOrSpecifiedCFF(sequence,self.PATDefaultCFF)
1677  self.labelsToAssociate.append('patTask')
1678  if self._options.isData:
1679  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllData")
1680  else:
1681  if self._options.fast:
1682  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMCFastSim")
1683  else:
1684  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMC")
1685 
1686  if self._options.hltProcess:
1687  if len(self._options.customise_commands) > 1:
1688  self._options.customise_commands = self._options.customise_commands + " \n"
1689  self._options.customise_commands = self._options.customise_commands + "process.patTrigger.processName = \""+self._options.hltProcess+"\"\n"
1690  self._options.customise_commands = self._options.customise_commands + "process.slimmedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1691  self._options.customise_commands = self._options.customise_commands + "process.patMuons.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1692 
1693 # self.renameHLTprocessInSequence(sequence)
1694 
1695  return
1696 

References ConfigBuilder.ConfigBuilder._options, mps_setup.append, ConfigBuilder.ConfigBuilder.labelsToAssociate, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.PATDefaultCFF, ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), and ConfigBuilder.ConfigBuilder.prepare_PATGEN().

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ prepare_PATFILTER()

def ConfigBuilder.ConfigBuilder.prepare_PATFILTER (   self,
  sequence = None 
)

Definition at line 1595 of file ConfigBuilder.py.

1595  def prepare_PATFILTER(self, sequence=None):
1596  self.loadAndRemember("PhysicsTools/PatAlgos/slimming/metFilterPaths_cff")
1597  from PhysicsTools.PatAlgos.slimming.metFilterPaths_cff import allMetFilterPaths
1598  for filt in allMetFilterPaths:
1599  self.schedule.append(getattr(self.process,'Flag_'+filt))
1600 

References mps_setup.append, ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.prepare_L1HwVal(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, and ConfigBuilder.ConfigBuilder.schedule.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PAT(), and ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI().

◆ prepare_PATGEN()

def ConfigBuilder.ConfigBuilder.prepare_PATGEN (   self,
  sequence = "miniGEN" 
)
Enrich the schedule with PATGEN 

Definition at line 1697 of file ConfigBuilder.py.

1697  def prepare_PATGEN(self, sequence = "miniGEN"):
1698  ''' Enrich the schedule with PATGEN '''
1699  self.loadDefaultOrSpecifiedCFF(sequence,self.PATGENDefaultCFF) #this is unscheduled
1700  self.labelsToAssociate.append('patGENTask')
1701  if self._options.isData:
1702  raise Exception("PATGEN step can only run on MC")
1703  return
1704 

References ConfigBuilder.ConfigBuilder._options, mps_setup.append, ConfigBuilder.ConfigBuilder.labelsToAssociate, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.PATGENDefaultCFF, and ConfigBuilder.ConfigBuilder.prepare_NANO().

Referenced by ConfigBuilder.ConfigBuilder.prepare_PAT().

◆ prepare_POSTRECO()

def ConfigBuilder.ConfigBuilder.prepare_POSTRECO (   self,
  sequence = None 
)
Enrich the schedule with the postreco step 

Definition at line 1790 of file ConfigBuilder.py.

1790  def prepare_POSTRECO(self, sequence = None):
1791  """ Enrich the schedule with the postreco step """
1792  self.loadAndRemember(self.POSTRECODefaultCFF)
1793  self.scheduleSequence('postreco_generator','postreco_step')
1794  return
1795 
1796 

References ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.POSTRECODefaultCFF, ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_USER().

◆ prepare_RAW2DIGI()

def ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI (   self,
  sequence = "RawToDigi" 
)

Definition at line 1588 of file ConfigBuilder.py.

1588  def prepare_RAW2DIGI(self, sequence = "RawToDigi"):
1589  self.loadDefaultOrSpecifiedCFF(sequence,self.RAW2DIGIDefaultCFF)
1590  self.scheduleSequence(sequence,'raw2digi_step')
1591  # if self._options.isRepacked:
1592  #self.renameInputTagsInSequence(sequence)
1593  return
1594 

References ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), ConfigBuilder.ConfigBuilder.RAW2DIGIDefaultCFF, and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2RECO().

◆ prepare_RAW2RECO()

def ConfigBuilder.ConfigBuilder.prepare_RAW2RECO (   self,
  sequence = None 
)

Definition at line 1577 of file ConfigBuilder.py.

1577  def prepare_RAW2RECO(self, sequence = None):
1578  if ','in sequence:
1579  seqReco=sequence.split(',')[1]
1580  seqDigi=sequence.split(',')[0]
1581  else:
1582  print("RAW2RECO requires two specifications",sequence,"insufficient")
1583 
1584  self.prepare_RAW2DIGI(seqDigi)
1585  self.prepare_RECO(seqReco)
1586  return
1587 

References ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI(), ConfigBuilder.ConfigBuilder.prepare_RECO(), and print().

Referenced by ConfigBuilder.ConfigBuilder.prepare_HLT().

◆ prepare_RECO()

def ConfigBuilder.ConfigBuilder.prepare_RECO (   self,
  sequence = "reconstruction" 
)
Enrich the schedule with reconstruction 

Definition at line 1652 of file ConfigBuilder.py.

1652  def prepare_RECO(self, sequence = "reconstruction"):
1653  ''' Enrich the schedule with reconstruction '''
1654  self.loadDefaultOrSpecifiedCFF(sequence,self.RECODefaultCFF)
1655  self.scheduleSequence(sequence.split('.')[-1],'reconstruction_step')
1656  return
1657 

References ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_RECOSIM(), ConfigBuilder.ConfigBuilder.RECODefaultCFF, and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2RECO().

◆ prepare_RECOBEFMIX()

def ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX (   self,
  sequence = "reconstruction" 
)
Enrich the schedule with the part of reconstruction that is done before mixing in FastSim

Definition at line 1664 of file ConfigBuilder.py.

1664  def prepare_RECOBEFMIX(self, sequence = "reconstruction"):
1665  ''' Enrich the schedule with the part of reconstruction that is done before mixing in FastSim'''
1666  if not self._options.fast:
1667  print("ERROR: this step is only implemented for FastSim")
1668  sys.exit()
1669  self.loadDefaultOrSpecifiedCFF(self.RECOBEFMIXDefaultSeq,self.RECOBEFMIXDefaultCFF)
1670  self.scheduleSequence(sequence.split('.')[-1],'reconstruction_befmix_step')
1671  return
1672 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_PAT(), print(), ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultCFF, ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultSeq, and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOSIM().

◆ prepare_RECOSIM()

def ConfigBuilder.ConfigBuilder.prepare_RECOSIM (   self,
  sequence = "recosim" 
)
Enrich the schedule with reconstruction 

Definition at line 1658 of file ConfigBuilder.py.

1658  def prepare_RECOSIM(self, sequence = "recosim"):
1659  ''' Enrich the schedule with reconstruction '''
1660  self.loadDefaultOrSpecifiedCFF(sequence,self.RECOSIMDefaultCFF)
1661  self.scheduleSequence(sequence.split('.')[-1],'recosim_step')
1662  return
1663 

References ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX(), ConfigBuilder.ConfigBuilder.RECOSIMDefaultCFF, and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECO().

◆ prepare_REPACK()

def ConfigBuilder.ConfigBuilder.prepare_REPACK (   self,
  sequence = None 
)

Definition at line 1497 of file ConfigBuilder.py.

1497  def prepare_REPACK(self, sequence = None):
1498  self.loadDefaultOrSpecifiedCFF(sequence,self.REPACKDefaultCFF)
1499  self.scheduleSequence(sequence.split('.')[-1],'digi2repack_step')
1500  return
1501 

References ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_L1(), ConfigBuilder.ConfigBuilder.REPACKDefaultCFF, and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

◆ prepare_SIM()

def ConfigBuilder.ConfigBuilder.prepare_SIM (   self,
  sequence = None 
)
Enrich the schedule with the simulation step

Definition at line 1432 of file ConfigBuilder.py.

1432  def prepare_SIM(self, sequence = None):
1433  """ Enrich the schedule with the simulation step"""
1434  self.loadDefaultOrSpecifiedCFF(sequence,self.SIMDefaultCFF)
1435  if not self._options.fast:
1436  if self._options.gflash==True:
1437  self.loadAndRemember("Configuration/StandardSequences/GFlashSIM_cff")
1438 
1439  if self._options.magField=='0T':
1440  self.executeAndRemember("process.g4SimHits.UseMagneticField = cms.bool(False)")
1441  else:
1442  if self._options.magField=='0T':
1443  self.executeAndRemember("process.fastSimProducer.detectorDefinition.magneticFieldZ = cms.untracked.double(0.)")
1444 
1445  self.scheduleSequence(sequence.split('.')[-1],'simulation_step')
1446  return
1447 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.executeAndRemember(), ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), ConfigBuilder.ConfigBuilder.scheduleSequence(), and ConfigBuilder.ConfigBuilder.SIMDefaultCFF.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ prepare_SKIM()

def ConfigBuilder.ConfigBuilder.prepare_SKIM (   self,
  sequence = "all" 
)
Enrich the schedule with skimming fragments

Definition at line 1740 of file ConfigBuilder.py.

1740  def prepare_SKIM(self, sequence = "all"):
1741  ''' Enrich the schedule with skimming fragments'''
1742  skimConfig = self.loadDefaultOrSpecifiedCFF(sequence,self.SKIMDefaultCFF)
1743  sequence = sequence.split('.')[-1]
1744 
1745  skimlist=sequence.split('+')
1746 
1747  from Configuration.Skimming.autoSkim import autoSkim
1748  self.expandMapping(skimlist,autoSkim)
1749 
1750  #print "dictionnary for skims:",skimConfig.__dict__
1751  for skim in skimConfig.__dict__:
1752  skimstream = getattr(skimConfig,skim)
1753  if isinstance(skimstream,cms.Path):
1754  #black list the alca path so that they do not appear in the cfg
1755  self.blacklist_paths.append(skimstream)
1756  if (not isinstance(skimstream,cms.FilteredStream)):
1757  continue
1758  shortname = skim.replace('SKIMStream','')
1759  if (sequence=="all"):
1760  self.addExtraStream(skim,skimstream)
1761  elif (shortname in skimlist):
1762  self.addExtraStream(skim,skimstream)
1763  #add a DQM eventcontent for this guy
1764  if self._options.datatier=='DQM':
1765  self.process.load(self.EVTCONTDefaultCFF)
1766  skimstreamDQM = cms.FilteredStream(
1767  responsible = skimstream.responsible,
1768  name = skimstream.name+'DQM',
1769  paths = skimstream.paths,
1770  selectEvents = skimstream.selectEvents,
1771  content = self._options.datatier+'EventContent',
1772  dataTier = cms.untracked.string(self._options.datatier)
1773  )
1774  self.addExtraStream(skim+'DQM',skimstreamDQM)
1775  for i in range(skimlist.count(shortname)):
1776  skimlist.remove(shortname)
1777 
1778 
1779 
1780  if (skimlist.__len__()!=0 and sequence!="all"):
1781  print('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1782  raise Exception('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1783 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addExtraStream(), mps_setup.append, ConfigBuilder.ConfigBuilder.blacklist_paths, ConfigBuilder.ConfigBuilder.EVTCONTDefaultCFF, ConfigBuilder.ConfigBuilder.expandMapping(), join(), ConfigBuilder.ConfigBuilder.load(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_USER(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, FastTimerService_cff.range, and ConfigBuilder.ConfigBuilder.SKIMDefaultCFF.

Referenced by ConfigBuilder.ConfigBuilder.prepare_EI().

◆ prepare_USER()

def ConfigBuilder.ConfigBuilder.prepare_USER (   self,
  sequence = None 
)
Enrich the schedule with a user defined sequence 

Definition at line 1784 of file ConfigBuilder.py.

1784  def prepare_USER(self, sequence = None):
1785  ''' Enrich the schedule with a user defined sequence '''
1786  self.loadDefaultOrSpecifiedCFF(sequence,self.USERDefaultCFF)
1787  self.scheduleSequence(sequence.split('.')[-1],'user_step')
1788  return
1789 

References ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_POSTRECO(), ConfigBuilder.ConfigBuilder.scheduleSequence(), and ConfigBuilder.ConfigBuilder.USERDefaultCFF.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

◆ prepare_VALIDATION()

def ConfigBuilder.ConfigBuilder.prepare_VALIDATION (   self,
  sequence = 'validation' 
)

Definition at line 1797 of file ConfigBuilder.py.

1797  def prepare_VALIDATION(self, sequence = 'validation'):
1798  print(sequence,"in preparing validation")
1799  self.loadDefaultOrSpecifiedCFF(sequence,self.VALIDATIONDefaultCFF)
1800  from Validation.Configuration.autoValidation import autoValidation
1801  #in case VALIDATION:something:somethingelse -> something,somethingelse
1802  sequence=sequence.split('.')[-1]
1803  if sequence.find(',')!=-1:
1804  prevalSeqName=sequence.split(',')[0].split('+')
1805  valSeqName=sequence.split(',')[1].split('+')
1806  self.expandMapping(prevalSeqName,autoValidation,index=0)
1807  self.expandMapping(valSeqName,autoValidation,index=1)
1808  else:
1809  if '@' in sequence:
1810  prevalSeqName=sequence.split('+')
1811  valSeqName=sequence.split('+')
1812  self.expandMapping(prevalSeqName,autoValidation,index=0)
1813  self.expandMapping(valSeqName,autoValidation,index=1)
1814  else:
1815  postfix=''
1816  if sequence:
1817  postfix='_'+sequence
1818  prevalSeqName=['prevalidation'+postfix]
1819  valSeqName=['validation'+postfix]
1820  if not hasattr(self.process,valSeqName[0]):
1821  prevalSeqName=['']
1822  valSeqName=[sequence]
1823 
1824  def NFI(index):
1825 
1826  if index==0:
1827  return ''
1828  else:
1829  return '%s'%index
1830 
1831 
1832  #rename the HLT process in validation steps
1833  if ('HLT' in self.stepMap and not self._options.fast) or self._options.hltProcess:
1834  for s in valSeqName+prevalSeqName:
1835  if s:
1836  self.renameHLTprocessInSequence(s)
1837  for (i,s) in enumerate(prevalSeqName):
1838  if s:
1839  setattr(self.process,'prevalidation_step%s'%NFI(i), cms.Path( getattr(self.process, s)) )
1840  self.schedule.append(getattr(self.process,'prevalidation_step%s'%NFI(i)))
1841 
1842  for (i,s) in enumerate(valSeqName):
1843  setattr(self.process,'validation_step%s'%NFI(i), cms.EndPath( getattr(self.process, s)))
1844  self.schedule.append(getattr(self.process,'validation_step%s'%NFI(i)))
1845 
1846  #needed in case the miniAODValidation sequence is run starting from AODSIM
1847  if 'PAT' in self.stepMap and not 'RECO' in self.stepMap:
1848  return
1849 
1850  if not 'DIGI' in self.stepMap and not self._options.fast and not any(map( lambda s : s.startswith('genvalid'), valSeqName)):
1851  if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True:
1852  self._options.restoreRNDSeeds=True
1853 
1854  if not 'DIGI' in self.stepMap and not self._options.fast:
1855  self.executeAndRemember("process.mix.playback = True")
1856  self.executeAndRemember("process.mix.digitizers = cms.PSet()")
1857  self.executeAndRemember("for a in process.aliases: delattr(process, a)")
1858  self._options.customisation_file.append("SimGeneral/MixingModule/fullMixCustomize_cff.setCrossingFrameOn")
1859 
1860  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
1861  #will get in the schedule, smoothly
1862  for (i,s) in enumerate(valSeqName):
1863  getattr(self.process,'validation_step%s'%NFI(i)).insert(0, self.process.genstepfilter)
1864 
1865  return
1866 
1867 

References ConfigBuilder.ConfigBuilder._options, any(), mps_setup.append, ConfigBuilder.ConfigBuilder.executeAndRemember(), ConfigBuilder.ConfigBuilder.expandMapping(), edm::eventsetup::heterocontainer.insert(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), genParticles_cff.map, resolutioncreator_cfi.object, print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.schedule, submitPVValidationJobs.split(), ConfigBuilder.ConfigBuilder.stepMap, and ConfigBuilder.ConfigBuilder.VALIDATIONDefaultCFF.

Referenced by ConfigBuilder.ConfigBuilder.prepare_POSTRECO().

◆ profileOptions()

def ConfigBuilder.ConfigBuilder.profileOptions (   self)
addIgProfService
Function to add the igprof profile service so that you can dump in the middle
of the run.

Definition at line 272 of file ConfigBuilder.py.

272  def profileOptions(self):
273  """
274  addIgProfService
275  Function to add the igprof profile service so that you can dump in the middle
276  of the run.
277  """
278  profileOpts = self._options.profile.split(':')
279  profilerStart = 1
280  profilerInterval = 100
281  profilerFormat = None
282  profilerJobFormat = None
283 
284  if len(profileOpts):
285  #type, given as first argument is unused here
286  profileOpts.pop(0)
287  if len(profileOpts):
288  startEvent = profileOpts.pop(0)
289  if not startEvent.isdigit():
290  raise Exception("%s is not a number" % startEvent)
291  profilerStart = int(startEvent)
292  if len(profileOpts):
293  eventInterval = profileOpts.pop(0)
294  if not eventInterval.isdigit():
295  raise Exception("%s is not a number" % eventInterval)
296  profilerInterval = int(eventInterval)
297  if len(profileOpts):
298  profilerFormat = profileOpts.pop(0)
299 
300 
301  if not profilerFormat:
302  profilerFormat = "%s___%s___%%I.gz" % (
303  self._options.evt_type.replace("_cfi", ""),
304  hashlib.md5(
305  str(self._options.step) + str(self._options.pileup) + str(self._options.conditions) +
306  str(self._options.datatier) + str(self._options.profileTypeLabel)
307  ).hexdigest()
308  )
309  if not profilerJobFormat and profilerFormat.endswith(".gz"):
310  profilerJobFormat = profilerFormat.replace(".gz", "_EndOfJob.gz")
311  elif not profilerJobFormat:
312  profilerJobFormat = profilerFormat + "_EndOfJob.gz"
313 
314  return (profilerStart,profilerInterval,profilerFormat,profilerJobFormat)
315 

References ConfigBuilder.ConfigBuilder._options, createfilelist.int, and str.

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

◆ renameHLTprocessInSequence()

def ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence (   self,
  sequence,
  proc = None,
  HLTprocess = 'HLT' 
)

Definition at line 1937 of file ConfigBuilder.py.

1937  def renameHLTprocessInSequence(self,sequence,proc=None,HLTprocess='HLT'):
1938  if self._options.hltProcess:
1939  proc=self._options.hltProcess
1940  else:
1941  proc=self.process.name_()
1942  if proc==HLTprocess: return
1943  # look up all module in dqm sequence
1944  print("replacing %s process name - sequence %s will use '%s'" % (HLTprocess,sequence, proc))
1945  getattr(self.process,sequence).visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor(HLTprocess,proc,whitelist = ("subSystemFolder",)))
1946  if 'from Configuration.Applications.ConfigBuilder import ConfigBuilder' not in self.additionalCommands:
1947  self.additionalCommands.append('from Configuration.Applications.ConfigBuilder import ConfigBuilder')
1948  self.additionalCommands.append('process.%s.visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor("%s", "%s", whitelist = ("subSystemFolder",)))'% (sequence,HLTprocess, proc))
1949 
1950 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.additionalCommands, mps_setup.append, ConfigBuilder.ConfigBuilder.expandMapping(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, and ConfigBuilder.ConfigBuilder.process.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), and ConfigBuilder.ConfigBuilder.renameInputTagsInSequence().

◆ renameInputTagsInSequence()

def ConfigBuilder.ConfigBuilder.renameInputTagsInSequence (   self,
  sequence,
  oldT = "rawDataCollector",
  newT = "rawDataRepacker" 
)

Definition at line 1927 of file ConfigBuilder.py.

1927  def renameInputTagsInSequence(self,sequence,oldT="rawDataCollector",newT="rawDataRepacker"):
1928  print("Replacing all InputTag %s => %s"%(oldT,newT))
1929  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
1930  massSearchReplaceAnyInputTag(getattr(self.process,sequence),oldT,newT)
1931  loadMe='from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag'
1932  if not loadMe in self.additionalCommands:
1933  self.additionalCommands.append(loadMe)
1934  self.additionalCommands.append('massSearchReplaceAnyInputTag(process.%s,"%s","%s",False,True)'%(sequence,oldT,newT))
1935 

References ConfigBuilder.ConfigBuilder.additionalCommands, mps_setup.append, MassReplace.massSearchReplaceAnyInputTag(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, and ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1REPACK().

◆ scheduleSequence()

def ConfigBuilder.ConfigBuilder.scheduleSequence (   self,
  seq,
  prefix,
  what = 'Path' 
)

Definition at line 1232 of file ConfigBuilder.py.

1232  def scheduleSequence(self,seq,prefix,what='Path'):
1233  if '*' in seq:
1234  #create only one path with all sequences in it
1235  for i,s in enumerate(seq.split('*')):
1236  if i==0:
1237  setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, s) ))
1238  else:
1239  p=getattr(self.process,prefix)
1240  tmp = getattr(self.process, s)
1241  if isinstance(tmp, cms.Task):
1242  p.associate(tmp)
1243  else:
1244  p+=tmp
1245  self.schedule.append(getattr(self.process,prefix))
1246  return
1247  else:
1248  #create as many path as many sequences
1249  if not '+' in seq:
1250  if self.nextScheduleIsConditional:
1251  self.conditionalPaths.append(prefix)
1252  setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, seq) ))
1253  self.schedule.append(getattr(self.process,prefix))
1254  else:
1255  for i,s in enumerate(seq.split('+')):
1256  sn=prefix+'%d'%(i)
1257  setattr(self.process,sn,getattr(cms,what)( getattr(self.process, s) ))
1258  self.schedule.append(getattr(self.process,sn))
1259  return
1260 

References mps_setup.append, ConfigBuilder.ConfigBuilder.conditionalPaths, ConfigBuilder.ConfigBuilder.nextScheduleIsConditional, DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.schedule, and ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

Referenced by ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.prepare_CFWRITER(), ConfigBuilder.ConfigBuilder.prepare_DATAMIX(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW(), ConfigBuilder.ConfigBuilder.prepare_EI(), ConfigBuilder.ConfigBuilder.prepare_L1(), ConfigBuilder.ConfigBuilder.prepare_L1Reco(), ConfigBuilder.ConfigBuilder.prepare_L1REPACK(), ConfigBuilder.ConfigBuilder.prepare_L1TrackTrigger(), ConfigBuilder.ConfigBuilder.prepare_NANO(), ConfigBuilder.ConfigBuilder.prepare_NANOGEN(), ConfigBuilder.ConfigBuilder.prepare_POSTRECO(), ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI(), ConfigBuilder.ConfigBuilder.prepare_RECO(), ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX(), ConfigBuilder.ConfigBuilder.prepare_RECOSIM(), ConfigBuilder.ConfigBuilder.prepare_REPACK(), ConfigBuilder.ConfigBuilder.prepare_SIM(), ConfigBuilder.ConfigBuilder.prepare_USER(), and ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

◆ scheduleSequenceAtEnd()

def ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd (   self,
  seq,
  prefix 
)

Definition at line 1261 of file ConfigBuilder.py.

1261  def scheduleSequenceAtEnd(self,seq,prefix):
1262  self.scheduleSequence(seq,prefix,what='EndPath')
1263  return
1264 

References ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ENDJOB(), ConfigBuilder.ConfigBuilder.prepare_GEN(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Member Data Documentation

◆ _options

ConfigBuilder.ConfigBuilder._options
private

◆ addedObjects

ConfigBuilder.ConfigBuilder.addedObjects

◆ additionalCommands

ConfigBuilder.ConfigBuilder.additionalCommands

◆ additionalOutputs

ConfigBuilder.ConfigBuilder.additionalOutputs

Definition at line 264 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ ALCADefaultCFF

ConfigBuilder.ConfigBuilder.ALCADefaultCFF

◆ ALCADefaultSeq

ConfigBuilder.ConfigBuilder.ALCADefaultSeq

Definition at line 987 of file ConfigBuilder.py.

◆ ALCAHARVESTDefaultCFF

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultCFF

Definition at line 975 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

◆ ALCAHARVESTDefaultSeq

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultSeq

Definition at line 998 of file ConfigBuilder.py.

◆ AlCaPaths

ConfigBuilder.ConfigBuilder.AlCaPaths

◆ blacklist_paths

ConfigBuilder.ConfigBuilder.blacklist_paths

◆ CFWRITERDefaultCFF

ConfigBuilder.ConfigBuilder.CFWRITERDefaultCFF

Definition at line 978 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_CFWRITER().

◆ CFWRITERDefaultSeq

ConfigBuilder.ConfigBuilder.CFWRITERDefaultSeq

Definition at line 999 of file ConfigBuilder.py.

◆ conditionalPaths

ConfigBuilder.ConfigBuilder.conditionalPaths

◆ ConditionsDefaultCFF

ConfigBuilder.ConfigBuilder.ConditionsDefaultCFF

Definition at line 977 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addConditions().

◆ DATAMIXDefaultCFF

ConfigBuilder.ConfigBuilder.DATAMIXDefaultCFF

Definition at line 982 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DATAMIX().

◆ DATAMIXDefaultSeq

ConfigBuilder.ConfigBuilder.DATAMIXDefaultSeq

Definition at line 992 of file ConfigBuilder.py.

◆ DIGI2RAWDefaultCFF

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultCFF

Definition at line 955 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

◆ DIGI2RAWDefaultSeq

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultSeq

Definition at line 993 of file ConfigBuilder.py.

◆ DIGIDefaultCFF

ConfigBuilder.ConfigBuilder.DIGIDefaultCFF

Definition at line 954 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI().

◆ DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.DIGIDefaultSeq

Definition at line 991 of file ConfigBuilder.py.

◆ DQMDefaultSeq

ConfigBuilder.ConfigBuilder.DQMDefaultSeq

Definition at line 1011 of file ConfigBuilder.py.

◆ DQMOFFLINEDefaultCFF

ConfigBuilder.ConfigBuilder.DQMOFFLINEDefaultCFF

Definition at line 973 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

◆ DQMSaverCFF

ConfigBuilder.ConfigBuilder.DQMSaverCFF

Definition at line 2015 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_HARVESTING().

◆ EIDefaultCFF

ConfigBuilder.ConfigBuilder.EIDefaultCFF

Definition at line 968 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_EI().

◆ EIDefaultSeq

ConfigBuilder.ConfigBuilder.EIDefaultSeq

Definition at line 1008 of file ConfigBuilder.py.

◆ ENDJOBDefaultCFF

ConfigBuilder.ConfigBuilder.ENDJOBDefaultCFF

Definition at line 976 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ENDJOB().

◆ ENDJOBDefaultSeq

ConfigBuilder.ConfigBuilder.ENDJOBDefaultSeq

Definition at line 1013 of file ConfigBuilder.py.

◆ EVTCONTDefaultCFF

ConfigBuilder.ConfigBuilder.EVTCONTDefaultCFF

◆ excludedPaths

ConfigBuilder.ConfigBuilder.excludedPaths

Definition at line 270 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ GENDefaultCFF

ConfigBuilder.ConfigBuilder.GENDefaultCFF

Definition at line 952 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GENDefaultSeq

ConfigBuilder.ConfigBuilder.GENDefaultSeq

Definition at line 989 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GeometryCFF

ConfigBuilder.ConfigBuilder.GeometryCFF

Definition at line 1084 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ geometryDBLabel

ConfigBuilder.ConfigBuilder.geometryDBLabel

Definition at line 1085 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ HARVESTINGDefaultCFF

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultCFF

Definition at line 974 of file ConfigBuilder.py.

◆ HARVESTINGDefaultSeq

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultSeq

Definition at line 997 of file ConfigBuilder.py.

◆ HLTDefaultCFF

ConfigBuilder.ConfigBuilder.HLTDefaultCFF

Definition at line 958 of file ConfigBuilder.py.

◆ HLTDefaultSeq

ConfigBuilder.ConfigBuilder.HLTDefaultSeq

Definition at line 994 of file ConfigBuilder.py.

◆ imports

ConfigBuilder.ConfigBuilder.imports

◆ inliner

ConfigBuilder.ConfigBuilder.inliner

load the relevant part

needs to be in reverse order

print it in the configuration

Definition at line 1628 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

◆ L1DefaultSeq

ConfigBuilder.ConfigBuilder.L1DefaultSeq

Definition at line 995 of file ConfigBuilder.py.

◆ L1EMDefaultCFF

ConfigBuilder.ConfigBuilder.L1EMDefaultCFF

Definition at line 956 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1().

◆ L1HwValDefaultCFF

ConfigBuilder.ConfigBuilder.L1HwValDefaultCFF

Definition at line 972 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1HwVal().

◆ L1HwValDefaultSeq

ConfigBuilder.ConfigBuilder.L1HwValDefaultSeq

Definition at line 1010 of file ConfigBuilder.py.

◆ L1MENUDefaultCFF

ConfigBuilder.ConfigBuilder.L1MENUDefaultCFF

Definition at line 957 of file ConfigBuilder.py.

◆ L1RecoDefaultCFF

ConfigBuilder.ConfigBuilder.L1RecoDefaultCFF

Definition at line 961 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1Reco().

◆ L1RecoDefaultSeq

ConfigBuilder.ConfigBuilder.L1RecoDefaultSeq

Definition at line 1001 of file ConfigBuilder.py.

◆ L1REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.L1REPACKDefaultSeq

Definition at line 996 of file ConfigBuilder.py.

◆ L1TrackTriggerDefaultCFF

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultCFF

◆ L1TrackTriggerDefaultSeq

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultSeq

Definition at line 1002 of file ConfigBuilder.py.

◆ labelsToAssociate

ConfigBuilder.ConfigBuilder.labelsToAssociate

◆ LHEDefaultSeq

ConfigBuilder.ConfigBuilder.LHEDefaultSeq

Definition at line 988 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ magFieldCFF

ConfigBuilder.ConfigBuilder.magFieldCFF

Definition at line 1080 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ NANODefaultCFF

ConfigBuilder.ConfigBuilder.NANODefaultCFF

Definition at line 966 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultSeq

ConfigBuilder.ConfigBuilder.NANODefaultSeq

Definition at line 1019 of file ConfigBuilder.py.

◆ NANOGENDefaultCFF

ConfigBuilder.ConfigBuilder.NANOGENDefaultCFF

Definition at line 967 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANOGEN().

◆ NANOGENDefaultSeq

ConfigBuilder.ConfigBuilder.NANOGENDefaultSeq

Definition at line 1018 of file ConfigBuilder.py.

◆ nextScheduleIsConditional

ConfigBuilder.ConfigBuilder.nextScheduleIsConditional

put the filtering path in the schedule

Definition at line 268 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequence().

◆ PATDefaultCFF

ConfigBuilder.ConfigBuilder.PATDefaultCFF

Definition at line 965 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PAT().

◆ PATDefaultSeq

ConfigBuilder.ConfigBuilder.PATDefaultSeq

Definition at line 1015 of file ConfigBuilder.py.

◆ PATGENDefaultCFF

ConfigBuilder.ConfigBuilder.PATGENDefaultCFF

Definition at line 1031 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

◆ PATGENDefaultSeq

ConfigBuilder.ConfigBuilder.PATGENDefaultSeq

Definition at line 1016 of file ConfigBuilder.py.

◆ POSTRECODefaultCFF

ConfigBuilder.ConfigBuilder.POSTRECODefaultCFF

Definition at line 970 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_POSTRECO().

◆ POSTRECODefaultSeq

ConfigBuilder.ConfigBuilder.POSTRECODefaultSeq

Definition at line 1009 of file ConfigBuilder.py.

◆ process

ConfigBuilder.ConfigBuilder.process

◆ productionFilterSequence

ConfigBuilder.ConfigBuilder.productionFilterSequence

put it before all the other paths

Definition at line 266 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare(), and ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ pythonCfgCode

ConfigBuilder.ConfigBuilder.pythonCfgCode

◆ RAW2DIGIDefaultCFF

ConfigBuilder.ConfigBuilder.RAW2DIGIDefaultCFF

Definition at line 959 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI().

◆ RAW2DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.RAW2DIGIDefaultSeq

Definition at line 1000 of file ConfigBuilder.py.

◆ RAW2RECODefaultSeq

ConfigBuilder.ConfigBuilder.RAW2RECODefaultSeq

Definition at line 1074 of file ConfigBuilder.py.

◆ RECOBEFMIXDefaultCFF

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultCFF

Definition at line 1135 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECOBEFMIXDefaultSeq

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultSeq

Definition at line 1136 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECODefaultCFF

ConfigBuilder.ConfigBuilder.RECODefaultCFF

Definition at line 963 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECO().

◆ RECODefaultSeq

ConfigBuilder.ConfigBuilder.RECODefaultSeq

Definition at line 1004 of file ConfigBuilder.py.

◆ RECOSIMDefaultCFF

ConfigBuilder.ConfigBuilder.RECOSIMDefaultCFF

Definition at line 964 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOSIM().

◆ RECOSIMDefaultSeq

ConfigBuilder.ConfigBuilder.RECOSIMDefaultSeq

Definition at line 1007 of file ConfigBuilder.py.

◆ REDIGIDefaultSeq

ConfigBuilder.ConfigBuilder.REDIGIDefaultSeq

Definition at line 1151 of file ConfigBuilder.py.

◆ REPACKDefaultCFF

ConfigBuilder.ConfigBuilder.REPACKDefaultCFF

Definition at line 979 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_REPACK().

◆ REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.REPACKDefaultSeq

Definition at line 1014 of file ConfigBuilder.py.

◆ runsAndWeights

ConfigBuilder.ConfigBuilder.runsAndWeights

drop LHEXMLStringProduct on input to save memory if appropriate

Definition at line 480 of file ConfigBuilder.py.

◆ runsAndWeightsInt

ConfigBuilder.ConfigBuilder.runsAndWeightsInt

Definition at line 501 of file ConfigBuilder.py.

◆ schedule

ConfigBuilder.ConfigBuilder.schedule

◆ SIMDefaultCFF

ConfigBuilder.ConfigBuilder.SIMDefaultCFF

Definition at line 953 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SIM().

◆ SIMDefaultSeq

ConfigBuilder.ConfigBuilder.SIMDefaultSeq

Definition at line 990 of file ConfigBuilder.py.

◆ SimGeometryCFF

ConfigBuilder.ConfigBuilder.SimGeometryCFF

Definition at line 1110 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ SKIMDefaultCFF

ConfigBuilder.ConfigBuilder.SKIMDefaultCFF

Definition at line 969 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

◆ stepKeys

ConfigBuilder.ConfigBuilder.stepKeys

Definition at line 226 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ stepMap

ConfigBuilder.ConfigBuilder.stepMap

◆ USERDefaultCFF

ConfigBuilder.ConfigBuilder.USERDefaultCFF

Definition at line 1077 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_USER().

◆ USERDefaultSeq

ConfigBuilder.ConfigBuilder.USERDefaultSeq

Definition at line 1076 of file ConfigBuilder.py.

◆ VALIDATIONDefaultCFF

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultCFF

Definition at line 971 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

◆ VALIDATIONDefaultSeq

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultSeq

Definition at line 1012 of file ConfigBuilder.py.

◆ with_input

ConfigBuilder.ConfigBuilder.with_input

Definition at line 250 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ with_output

ConfigBuilder.ConfigBuilder.with_output

Definition at line 245 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

helpers.associatePatAlgosToolsTask
def associatePatAlgosToolsTask(process)
Definition: helpers.py:24
LumiList.LumiList
Definition: LumiList.py:22
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
logErrorHarvester_cff.customiseLogErrorHarvesterUsingOutputCommands
def customiseLogErrorHarvesterUsingOutputCommands(process)
Definition: logErrorHarvester_cff.py:4
resolutioncreator_cfi.object
object
Definition: resolutioncreator_cfi.py:4
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
cms::cuda::assert
assert(be >=bs)
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
earlyDeleteSettings_cff.customiseEarlyDelete
def customiseEarlyDelete(process)
Definition: earlyDeleteSettings_cff.py:40
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
ConfigBuilder.filesFromList
def filesFromList(fileName, s=None)
Definition: ConfigBuilder.py:102
ConfigBuilder.filesFromDASQuery
def filesFromDASQuery(query, option="", s=None)
Definition: ConfigBuilder.py:136
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
any
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
CustomConfigs.ProcessName
def ProcessName(process)
Definition: CustomConfigs.py:8
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
str
#define str(s)
Definition: TestProcessor.cc:53
svgfig.load
def load(fileName)
Definition: svgfig.py:547
geometryDiff.file
file
Definition: geometryDiff.py:13
GlobalTag
Definition: GlobalTag.h:4
DictTypes.SortedKeysDict
Definition: DictTypes.py:2
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
LumiToRun.lumi_to_run
def lumi_to_run(runs, events_in_sample, events_per_job)
Definition: LumiToRun.py:1
Mixing.defineMixing
def defineMixing(dict)
Definition: Mixing.py:189
Exception
mps_setup.append
append
Definition: mps_setup.py:85
createfilelist.int
int
Definition: createfilelist.py:10
metFilterPaths_cff
helpers
ConfigBuilder.anyOf
def anyOf(listOfKeys, dict, opt=None)
Definition: ConfigBuilder.py:184
TriggerAnalyzer.__str__
def __str__(self)
Definition: TriggerAnalyzer.py:103
ComparisonHelper::zip
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
Definition: L1TStage2CaloLayer1.h:41
miniAOD_tools.miniAOD_customizeOutput
def miniAOD_customizeOutput(out)
Definition: miniAOD_tools.py:608
ConfigBuilder.dumpPython
def dumpPython(process, name)
Definition: ConfigBuilder.py:94
ThrowAndSetRandomRun.throwAndSetRandomRun
def throwAndSetRandomRun(source, runsAndProbs)
Definition: ThrowAndSetRandomRun.py:7
edm::eventsetup::heterocontainer::insert
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
MassReplace.massSearchReplaceAnyInputTag
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
genParticles_cff.map
map
Definition: genParticles_cff.py:11
FastTimer.addOutput
def addOutput(process)
Definition: FastTimer.py:47
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444