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')
 
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' 
)

Definition at line 1154 of file ConfigBuilder.py.

1154  def addExtraStream(self, name, stream, workflow='full'):
1155  # define output module and go from there
1156  output = cms.OutputModule("PoolOutputModule")
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  #add an automatic flushing to limit memory consumption
1191  output.eventAutoFlushCompressedSize=cms.untracked.int32(5*1024*1024)
1192 
1193  if workflow in ("producers,full"):
1194  if isinstance(stream.paths,tuple):
1195  for path in stream.paths:
1196  self.schedule.append(path)
1197  else:
1198  self.schedule.append(stream.paths)
1199 
1200 
1201  # in case of relvals we don't want to have additional outputs
1202  if (not self._options.relval) and workflow in ("full","output"):
1203  self.additionalOutputs[name] = output
1204  setattr(self.process,name,output)
1205 
1206  if workflow == 'output':
1207  # adjust the select events to the proper trigger results from previous process
1208  filterList = output.SelectEvents.SelectEvents
1209  for i, filter in enumerate(filterList):
1210  filterList[i] = filter+":"+self._options.triggerResultsProcess
1211 
1212  return output
1213 

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 2093 of file ConfigBuilder.py.

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

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 2104 of file ConfigBuilder.py.

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

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 1948 of file ConfigBuilder.py.

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

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 2088 of file ConfigBuilder.py.

2088  def finalizeFastSimHLT(self):
2089  self.process.reconstruction = cms.Path(self.process.reconstructionWithFamos)
2090  self.schedule.append(self.process.reconstruction)
2091 
2092 

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 1219 of file ConfigBuilder.py.

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

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 2151 of file ConfigBuilder.py.

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

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 1270 of file ConfigBuilder.py.

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

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 2048 of file ConfigBuilder.py.

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

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 1267 of file ConfigBuilder.py.

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

References ConfigBuilder.ConfigBuilder.prepare_ALCA().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER().

◆ prepare_ALCAPRODUCER()

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

Definition at line 1264 of file ConfigBuilder.py.

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

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 1465 of file ConfigBuilder.py.

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

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 1471 of file ConfigBuilder.py.

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

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 1445 of file ConfigBuilder.py.

1445  def prepare_DIGI(self, sequence = None):
1446  """ Enrich the schedule with the digitisation step"""
1447  self.loadDefaultOrSpecifiedCFF(sequence,self.DIGIDefaultCFF)
1448 
1449  if self._options.gflash==True:
1450  self.loadAndRemember("Configuration/StandardSequences/GFlashDIGI_cff")
1451 
1452  if sequence == 'pdigi_valid' or sequence == 'pdigi_hi':
1453  self.executeAndRemember("process.mix.digitizers = cms.PSet(process.theDigitizersValid)")
1454 
1455  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":
1456  if self._options.inputEventContent=='':
1457  self._options.inputEventContent='REGEN'
1458  else:
1459  self._options.inputEventContent=self._options.inputEventContent+',REGEN'
1460 
1461 
1462  self.scheduleSequence(sequence.split('.')[-1],'digitisation_step')
1463  return
1464 

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 1489 of file ConfigBuilder.py.

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

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 1967 of file ConfigBuilder.py.

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

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 1725 of file ConfigBuilder.py.

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

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 2083 of file ConfigBuilder.py.

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

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 1617 of file ConfigBuilder.py.

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

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 1345 of file ConfigBuilder.py.

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

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 2010 of file ConfigBuilder.py.

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

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 1519 of file ConfigBuilder.py.

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

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 1499 of file ConfigBuilder.py.

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

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 1598 of file ConfigBuilder.py.

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

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 1605 of file ConfigBuilder.py.

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

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 1506 of file ConfigBuilder.py.

1506  def prepare_L1REPACK(self, sequence = None):
1507  """ 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"""
1508  supported = ['GT','GT1','GT2','GCTGT','Full','FullSimTP','FullMC','Full2015Data','uGT','CalouGT']
1509  if sequence in supported:
1510  self.loadAndRemember('Configuration/StandardSequences/SimL1EmulatorRepack_%s_cff'%sequence)
1511  if self._options.scenario == 'HeavyIons':
1512  self.renameInputTagsInSequence("SimL1Emulator","rawDataCollector","rawDataRepacker")
1513  self.scheduleSequence('SimL1Emulator','L1RePack_step')
1514  else:
1515  print("L1REPACK with '",sequence,"' is not supported! Supported choices are: ",supported)
1516  raise Exception('unsupported feature')
1517 
1518 

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 1611 of file ConfigBuilder.py.

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

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 1328 of file ConfigBuilder.py.

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

◆ prepare_NANO()

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

Definition at line 1702 of file ConfigBuilder.py.

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

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 1713 of file ConfigBuilder.py.

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

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 1670 of file ConfigBuilder.py.

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

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 1592 of file ConfigBuilder.py.

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

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 1694 of file ConfigBuilder.py.

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

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 1787 of file ConfigBuilder.py.

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

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 1585 of file ConfigBuilder.py.

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

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 1574 of file ConfigBuilder.py.

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

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 1649 of file ConfigBuilder.py.

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

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 1661 of file ConfigBuilder.py.

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

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 1655 of file ConfigBuilder.py.

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

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 1494 of file ConfigBuilder.py.

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

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 1429 of file ConfigBuilder.py.

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

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 1737 of file ConfigBuilder.py.

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

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 1781 of file ConfigBuilder.py.

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

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 1794 of file ConfigBuilder.py.

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

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)).encode('utf-8')
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, alcaDQMUpload.encode(), createfilelist.int, and str.

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

◆ renameHLTprocessInSequence()

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

Definition at line 1934 of file ConfigBuilder.py.

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

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 1924 of file ConfigBuilder.py.

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

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 1231 of file ConfigBuilder.py.

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

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 1260 of file ConfigBuilder.py.

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

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 2012 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 1625 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
alcaDQMUpload.encode
def encode(args, files)
Definition: alcaDQMUpload.py:32
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