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

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

Member Function Documentation

◆ addCommon()

def ConfigBuilder.ConfigBuilder.addCommon (   self)

Definition at line 337 of file ConfigBuilder.py.

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

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

808  def addConditions(self):
809  """Add conditions to the process"""
810  if not self._options.conditions: return
811 
812  if 'FrontierConditions_GlobalTag' in self._options.conditions:
813  print('using FrontierConditions_GlobalTag in --conditions is not necessary anymore and will be deprecated soon. please update your command line')
814  self._options.conditions = self._options.conditions.replace("FrontierConditions_GlobalTag,",'')
815 
816  self.loadAndRemember(self.ConditionsDefaultCFF)
817  from Configuration.AlCa.GlobalTag import GlobalTag
818  self.process.GlobalTag = GlobalTag(self.process.GlobalTag, self._options.conditions, self._options.custom_conditions)
819  self.additionalCommands.append('from Configuration.AlCa.GlobalTag import GlobalTag')
820  self.additionalCommands.append('process.GlobalTag = GlobalTag(process.GlobalTag, %s, %s)' % (repr(self._options.conditions), repr(self._options.custom_conditions)))
821 
822 

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

823  def addCustomise(self,unsch=0):
824  """Include the customise code """
825 
826  custOpt=[]
827  if unsch==0:
828  for c in self._options.customisation_file:
829  custOpt.extend(c.split(","))
830  else:
831  for c in self._options.customisation_file_unsch:
832  custOpt.extend(c.split(","))
833 
834  custMap=DictTypes.SortedKeysDict()
835  for opt in custOpt:
836  if opt=='': continue
837  if opt.count('.')>1:
838  raise Exception("more than . in the specification:"+opt)
839  fileName=opt.split('.')[0]
840  if opt.count('.')==0: rest='customise'
841  else:
842  rest=opt.split('.')[1]
843  if rest=='py': rest='customise' #catch the case of --customise file.py
844 
845  if fileName in custMap:
846  custMap[fileName].extend(rest.split('+'))
847  else:
848  custMap[fileName]=rest.split('+')
849 
850  if len(custMap)==0:
851  final_snippet='\n'
852  else:
853  final_snippet='\n# customisation of the process.\n'
854 
855  allFcn=[]
856  for opt in custMap:
857  allFcn.extend(custMap[opt])
858  for fcn in allFcn:
859  if allFcn.count(fcn)!=1:
860  raise Exception("cannot specify twice "+fcn+" as a customisation method")
861 
862  for f in custMap:
863  # let python search for that package and do syntax checking at the same time
864  packageName = f.replace(".py","").replace("/",".")
865  __import__(packageName)
866  package = sys.modules[packageName]
867 
868  # now ask the package for its definition and pick .py instead of .pyc
869  customiseFile = re.sub(r'\.pyc$', '.py', package.__file__)
870 
871  final_snippet+='\n# Automatic addition of the customisation function from '+packageName+'\n'
872  if self._options.inline_custom:
873  for line in file(customiseFile,'r'):
874  if "import FWCore.ParameterSet.Config" in line:
875  continue
876  final_snippet += line
877  else:
878  final_snippet += 'from %s import %s \n'%(packageName,','.join(custMap[f]))
879  for fcn in custMap[f]:
880  print("customising the process with",fcn,"from",f)
881  if not hasattr(package,fcn):
882  #bound to fail at run time
883  raise Exception("config "+f+" has no function "+fcn)
884  #execute the command
885  self.process=getattr(package,fcn)(self.process)
886  #and print it in the configuration
887  final_snippet += "\n#call to customisation function "+fcn+" imported from "+packageName
888  final_snippet += "\nprocess = %s(process)\n"%(fcn,)
889 
890  if len(custMap)!=0:
891  final_snippet += '\n# End of customisation functions\n'
892 
893 
894  return final_snippet
895 

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addCustomiseCmdLine(), FrontierConditions_GlobalTag_cff.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 896 of file ConfigBuilder.py.

896  def addCustomiseCmdLine(self):
897  final_snippet='\n# Customisation from command line\n'
898  if self._options.customise_commands:
899  import string
900  for com in self._options.customise_commands.split('\\n'):
901  com=com.lstrip()
902  self.executeAndRemember(com)
903  final_snippet +='\n'+com
904 
905  return final_snippet
906 

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

1127  def addExtraStream(self,name,stream,workflow='full'):
1128  # define output module and go from there
1129  output = cms.OutputModule("PoolOutputModule")
1130  if stream.selectEvents.parameters_().__len__()!=0:
1131  output.SelectEvents = stream.selectEvents
1132  else:
1133  output.SelectEvents = cms.untracked.PSet()
1134  output.SelectEvents.SelectEvents=cms.vstring()
1135  if isinstance(stream.paths,tuple):
1136  for path in stream.paths:
1137  output.SelectEvents.SelectEvents.append(path.label())
1138  else:
1139  output.SelectEvents.SelectEvents.append(stream.paths.label())
1140 
1141 
1142 
1143  if isinstance(stream.content,str):
1144  evtPset=getattr(self.process,stream.content)
1145  for p in evtPset.parameters_():
1146  setattr(output,p,getattr(evtPset,p))
1147  if not self._options.inlineEventContent:
1148  def doNotInlineEventContent(instance,label = "process."+stream.content+".outputCommands"):
1149  return label
1150  output.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
1151  else:
1152  output.outputCommands = stream.content
1153 
1154 
1155  output.fileName = cms.untracked.string(self._options.dirout+stream.name+'.root')
1156 
1157  output.dataset = cms.untracked.PSet( dataTier = stream.dataTier,
1158  filterName = cms.untracked.string(stream.name))
1159 
1160  if self._options.filtername:
1161  output.dataset.filterName= cms.untracked.string(self._options.filtername+"_"+stream.name)
1162 
1163  #add an automatic flushing to limit memory consumption
1164  output.eventAutoFlushCompressedSize=cms.untracked.int32(5*1024*1024)
1165 
1166  if workflow in ("producers,full"):
1167  if isinstance(stream.paths,tuple):
1168  for path in stream.paths:
1169  self.schedule.append(path)
1170  else:
1171  self.schedule.append(stream.paths)
1172 
1173 
1174  # in case of relvals we don't want to have additional outputs
1175  if (not self._options.relval) and workflow in ("full","output"):
1176  self.additionalOutputs[name] = output
1177  setattr(self.process,name,output)
1178 
1179  if workflow == 'output':
1180  # adjust the select events to the proper trigger results from previous process
1181  filterList = output.SelectEvents.SelectEvents
1182  for i, filter in enumerate(filterList):
1183  filterList[i] = filter+":"+self._options.triggerResultsProcess
1184 
1185  return output
1186 

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

◆ addMaxEvents()

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

Definition at line 366 of file ConfigBuilder.py.

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

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

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

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

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

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

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

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

2066  def build_production_info(self, evt_type, evtnumber):
2067  """ Add useful info for the production. """
2068  self.process.configurationMetadata=cms.untracked.PSet\
2069  (version=cms.untracked.string("$Revision: 1.19 $"),
2070  name=cms.untracked.string("Applications"),
2071  annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber))
2072  )
2073 
2074  self.addedObjects.append(("Production Info","configurationMetadata"))
2075 
2076 

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

778  def completeInputCommand(self):
779  if self._options.inputEventContent:
780  import copy
781  def dropSecondDropStar(iec):
782  #drop occurence of 'drop *' in the list
783  count=0
784  for item in iec:
785  if item=='drop *':
786  if count!=0:
787  iec.remove(item)
788  count+=1
789 
790 
791  if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring()
792  for evct in self._options.inputEventContent.split(','):
793  if evct=='': continue
794  theEventContent = getattr(self.process, evct+"EventContent")
795  if hasattr(theEventContent,'outputCommands'):
796  self.process.source.inputCommands.extend(copy.copy(theEventContent.outputCommands))
797  if hasattr(theEventContent,'inputCommands'):
798  self.process.source.inputCommands.extend(copy.copy(theEventContent.inputCommands))
799 
800  dropSecondDropStar(self.process.source.inputCommands)
801 
802  if not self._options.dropDescendant:
803  self.process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool(False)
804 
805 
806  return
807 

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

2077  def create_process(self):
2078  self.pythonCfgCode = "# Auto generated configuration file\n"
2079  self.pythonCfgCode += "# using: \n# "+__version__[1:-1]+"\n# "+__source__[1:-1]+'\n'
2080  self.pythonCfgCode += "# with command line options: "+self._options.arguments+'\n'
2081  self.pythonCfgCode += "import FWCore.ParameterSet.Config as cms\n\n"
2082 
2083  # now set up the modifies
2084  modifiers=[]
2085  modifierStrings=[]
2086  modifierImports=[]
2087 
2088  if hasattr(self._options,"era") and self._options.era :
2089  # Multiple eras can be specified in a comma seperated list
2090  from Configuration.StandardSequences.Eras import eras
2091  for requestedEra in self._options.era.split(",") :
2092  modifierStrings.append(requestedEra)
2093  modifierImports.append(eras.pythonCfgLines[requestedEra])
2094  modifiers.append(getattr(eras,requestedEra))
2095 
2096 
2097  if hasattr(self._options,"procModifiers") and self._options.procModifiers:
2098  import importlib
2099  thingsImported=[]
2100  for pm in self._options.procModifiers.split(','):
2101  modifierStrings.append(pm)
2102  modifierImports.append('from Configuration.ProcessModifiers.'+pm+'_cff import '+pm)
2103  modifiers.append(getattr(importlib.import_module('Configuration.ProcessModifiers.'+pm+'_cff'),pm))
2104 
2105  self.pythonCfgCode += '\n'.join(modifierImports)+'\n\n'
2106  self.pythonCfgCode += "process = cms.Process('"+self._options.name+"'" # Start of the line, finished after the loop
2107 
2108 
2109  if len(modifierStrings)>0:
2110  self.pythonCfgCode+= ','+','.join(modifierStrings)
2111  self.pythonCfgCode+=')\n\n'
2112 
2113  #yes, the cfg code gets out of sync here if a process is passed in. That could be fixed in the future
2114  #assuming there is some way for the fwk to get the list of modifiers (and their stringified name)
2115  if self.process == None:
2116  if len(modifiers)>0:
2117  self.process = cms.Process(self._options.name,*modifiers)
2118  else:
2119  self.process = cms.Process(self._options.name)
2120 
2121 
2122 
2123 

References ConfigBuilder.ConfigBuilder.pythonCfgCode.

Referenced by ConfigBuilder.ConfigBuilder.build_production_info().

◆ define_Configs()

def ConfigBuilder.ConfigBuilder.define_Configs (   self)

Definition at line 911 of file ConfigBuilder.py.

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

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

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

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

1921  def expandMapping(self,seqList,mapping,index=None):
1922  maxLevel=30
1923  level=0
1924  while '@' in repr(seqList) and level<maxLevel:
1925  level+=1
1926  for specifiedCommand in seqList:
1927  if specifiedCommand.startswith('@'):
1928  location=specifiedCommand[1:]
1929  if not location in mapping:
1930  raise Exception("Impossible to map "+location+" from "+repr(mapping))
1931  mappedTo=mapping[location]
1932  if index!=None:
1933  mappedTo=mappedTo[index]
1934  seqList.remove(specifiedCommand)
1935  seqList.extend(mappedTo.split('+'))
1936  break;
1937  if level==maxLevel:
1938  raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
1939 

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

2061  def finalizeFastSimHLT(self):
2062  self.process.reconstruction = cms.Path(self.process.reconstructionWithFamos)
2063  self.schedule.append(self.process.reconstruction)
2064 
2065 

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

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

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

1192  def loadDefaultOrSpecifiedCFF(self, sequence,defaultCFF):
1193  if ( len(sequence.split('.'))==1 ):
1194  l=self.loadAndRemember(defaultCFF)
1195  elif ( len(sequence.split('.'))==2 ):
1196  l=self.loadAndRemember(sequence.split('.')[0])
1197  sequence=sequence.split('.')[1]
1198  else:
1199  print("sub sequence configuration must be of the form dir/subdir/cff.a+b+c or cff.a")
1200  print(sequence,"not recognized")
1201  raise
1202  return l
1203 

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

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

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

1243  def prepare_ALCA(self, sequence = None, workflow = 'full'):
1244  """ Enrich the process with alca streams """
1245  alcaConfig=self.loadDefaultOrSpecifiedCFF(sequence,self.ALCADefaultCFF)
1246  sequence = sequence.split('.')[-1]
1247 
1248  # decide which ALCA paths to use
1249  alcaList = sequence.split("+")
1250  maxLevel=0
1251  from Configuration.AlCa.autoAlca import autoAlca
1252  # support @X from autoAlca.py, and recursion support: i.e T0:@Mu+@EG+...
1253  self.expandMapping(alcaList,autoAlca)
1254  self.AlCaPaths=[]
1255  for name in alcaConfig.__dict__:
1256  alcastream = getattr(alcaConfig,name)
1257  shortName = name.replace('ALCARECOStream','')
1258  if shortName in alcaList and isinstance(alcastream,cms.FilteredStream):
1259  output = self.addExtraStream(name,alcastream, workflow = workflow)
1260  self.executeAndRemember('process.ALCARECOEventContent.outputCommands.extend(process.OutALCARECO'+shortName+'_noDrop.outputCommands)')
1261  self.AlCaPaths.append(shortName)
1262  if 'DQM' in alcaList:
1263  if not self._options.inlineEventContent and hasattr(self.process,name):
1264  self.executeAndRemember('process.' + name + '.outputCommands.append("keep *_MEtoEDMConverter_*_*")')
1265  else:
1266  output.outputCommands.append("keep *_MEtoEDMConverter_*_*")
1267 
1268  #rename the HLT process name in the alca modules
1269  if self._options.hltProcess or 'HLT' in self.stepMap:
1270  if isinstance(alcastream.paths,tuple):
1271  for path in alcastream.paths:
1272  self.renameHLTprocessInSequence(path.label())
1273  else:
1274  self.renameHLTprocessInSequence(alcastream.paths.label())
1275 
1276  for i in range(alcaList.count(shortName)):
1277  alcaList.remove(shortName)
1278 
1279  # DQM needs a special handling
1280  elif name == 'pathALCARECODQM' and 'DQM' in alcaList:
1281  path = getattr(alcaConfig,name)
1282  self.schedule.append(path)
1283  alcaList.remove('DQM')
1284 
1285  if isinstance(alcastream,cms.Path):
1286  #black list the alca path so that they do not appear in the cfg
1287  self.blacklist_paths.append(alcastream)
1288 
1289 
1290  if len(alcaList) != 0:
1291  available=[]
1292  for name in alcaConfig.__dict__:
1293  alcastream = getattr(alcaConfig,name)
1294  if isinstance(alcastream,cms.FilteredStream):
1295  available.append(name.replace('ALCARECOStream',''))
1296  print("The following alcas could not be found "+str(alcaList))
1297  print("available ",available)
1298  #print "verify your configuration, ignoring for now"
1299  raise Exception("The following alcas could not be found "+str(alcaList))
1300 

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

2021  def prepare_ALCAHARVEST(self, sequence = None):
2022  """ Enrich the process with AlCaHarvesting step """
2023  harvestingConfig = self.loadAndRemember(self.ALCAHARVESTDefaultCFF)
2024  sequence=sequence.split(".")[-1]
2025 
2026  # decide which AlcaHARVESTING paths to use
2027  harvestingList = sequence.split("+")
2028 
2029 
2030 
2031  from Configuration.AlCa.autoPCL import autoPCL
2032  self.expandMapping(harvestingList,autoPCL)
2033 
2034  for name in harvestingConfig.__dict__:
2035  harvestingstream = getattr(harvestingConfig,name)
2036  if name in harvestingList and isinstance(harvestingstream,cms.Path):
2037  self.schedule.append(harvestingstream)
2038  if isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_dbOutput"), cms.VPSet) and \
2039  isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_metadata"), cms.VPSet):
2040  self.executeAndRemember("process.PoolDBOutputService.toPut.extend(process.ALCAHARVEST" + name + "_dbOutput)")
2041  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.extend(process.ALCAHARVEST" + name + "_metadata)")
2042  else:
2043  self.executeAndRemember("process.PoolDBOutputService.toPut.append(process.ALCAHARVEST" + name + "_dbOutput)")
2044  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVEST" + name + "_metadata)")
2045  harvestingList.remove(name)
2046  # append the common part at the end of the sequence
2047  lastStep = getattr(harvestingConfig,"ALCAHARVESTDQMSaveAndMetadataWriter")
2048  self.schedule.append(lastStep)
2049 
2050  if len(harvestingList) != 0 and 'dummyHarvesting' not in harvestingList :
2051  print("The following harvesting could not be found : ", harvestingList)
2052  raise Exception("The following harvesting could not be found : "+str(harvestingList))
2053 
2054 
2055 

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

1240  def prepare_ALCAOUTPUT(self, sequence = None):
1241  self.prepare_ALCA(sequence, workflow = "output")
1242 

References ConfigBuilder.ConfigBuilder.prepare_ALCA().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER().

◆ prepare_ALCAPRODUCER()

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

Definition at line 1237 of file ConfigBuilder.py.

1237  def prepare_ALCAPRODUCER(self, sequence = None):
1238  self.prepare_ALCA(sequence, workflow = "producers")
1239 

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

1438  def prepare_CFWRITER(self, sequence = None):
1439  """ Enrich the schedule with the crossing frame writer step"""
1440  self.loadAndRemember(self.CFWRITERDefaultCFF)
1441  self.scheduleSequence('pcfw','cfwriter_step')
1442  return
1443 

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

1444  def prepare_DATAMIX(self, sequence = None):
1445  """ Enrich the schedule with the digitisation step"""
1446  self.loadAndRemember(self.DATAMIXDefaultCFF)
1447  self.scheduleSequence('pdatamix','datamixing_step')
1448 
1449  if self._options.pileup_input:
1450  theFiles=''
1451  if self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:'):
1452  theFiles=filesFromDASQuery('file dataset = %s'%(self._options.pileup_input[4:],),self._options.pileup_dasoption)[0]
1453  elif self._options.pileup_input.startswith("filelist:"):
1454  theFiles= (filesFromList(self._options.pileup_input[9:]))[0]
1455  else:
1456  theFiles=self._options.pileup_input.split(',')
1457  #print theFiles
1458  self.executeAndRemember( "process.mixData.input.fileNames = cms.untracked.vstring(%s)"%( theFiles ) )
1459 
1460  return
1461 

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

1418  def prepare_DIGI(self, sequence = None):
1419  """ Enrich the schedule with the digitisation step"""
1420  self.loadDefaultOrSpecifiedCFF(sequence,self.DIGIDefaultCFF)
1421 
1422  if self._options.gflash==True:
1423  self.loadAndRemember("Configuration/StandardSequences/GFlashDIGI_cff")
1424 
1425  if sequence == 'pdigi_valid' or sequence == 'pdigi_hi':
1426  self.executeAndRemember("process.mix.digitizers = cms.PSet(process.theDigitizersValid)")
1427 
1428  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":
1429  if self._options.inputEventContent=='':
1430  self._options.inputEventContent='REGEN'
1431  else:
1432  self._options.inputEventContent=self._options.inputEventContent+',REGEN'
1433 
1434 
1435  self.scheduleSequence(sequence.split('.')[-1],'digitisation_step')
1436  return
1437 

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

1462  def prepare_DIGI2RAW(self, sequence = None):
1463  self.loadDefaultOrSpecifiedCFF(sequence,self.DIGI2RAWDefaultCFF)
1464  self.scheduleSequence(sequence.split('.')[-1],'digi2raw_step')
1465  return
1466 

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

1940  def prepare_DQM(self, sequence = 'DQMOffline'):
1941  # this one needs replacement
1942 
1943  # any 'DQM' job should use DQMStore in non-legacy mode (but not HARVESTING)
1944  self.loadAndRemember("DQMServices/Core/DQMStoreNonLegacy_cff")
1945  self.loadDefaultOrSpecifiedCFF(sequence,self.DQMOFFLINEDefaultCFF)
1946  sequenceList=sequence.split('.')[-1].split('+')
1947  postSequenceList=sequence.split('.')[-1].split('+')
1948  from DQMOffline.Configuration.autoDQM import autoDQM
1949  self.expandMapping(sequenceList,autoDQM,index=0)
1950  self.expandMapping(postSequenceList,autoDQM,index=1)
1951 
1952  if len(set(sequenceList))!=len(sequenceList):
1953  sequenceList=list(set(sequenceList))
1954  print("Duplicate entries for DQM:, using",sequenceList)
1955 
1956  pathName='dqmoffline_step'
1957  for (i,sequence) in enumerate(sequenceList):
1958  if (i!=0):
1959  pathName='dqmoffline_%d_step'%(i)
1960 
1961  if 'HLT' in self.stepMap.keys() or self._options.hltProcess:
1962  self.renameHLTprocessInSequence(sequence)
1963 
1964  setattr(self.process,pathName, cms.EndPath( getattr(self.process,sequence ) ) )
1965  self.schedule.append(getattr(self.process,pathName))
1966 
1967  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
1968  #will get in the schedule, smoothly
1969  getattr(self.process,pathName).insert(0,self.process.genstepfilter)
1970 
1971 
1972  pathName='dqmofflineOnPAT_step'
1973  for (i,sequence) in enumerate(postSequenceList):
1974  #Fix needed to avoid duplication of sequences not defined in autoDQM or without a PostDQM
1975  if (sequenceList[i]==postSequenceList[i]):
1976  continue
1977  if (i!=0):
1978  pathName='dqmofflineOnPAT_%d_step'%(i)
1979 
1980  setattr(self.process,pathName, cms.EndPath( getattr(self.process, sequence ) ) )
1981  self.schedule.append(getattr(self.process,pathName))
1982 

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

1698  def prepare_EI(self, sequence = None):
1699  ''' Enrich the schedule with event interpretation '''
1700  from Configuration.StandardSequences.EventInterpretation import EventInterpretation
1701  if sequence in EventInterpretation:
1702  self.EIDefaultCFF = EventInterpretation[sequence]
1703  sequence = 'EIsequence'
1704  else:
1705  raise Exception('Cannot set %s event interpretation'%( sequence) )
1706  self.loadDefaultOrSpecifiedCFF(sequence,self.EIDefaultCFF)
1707  self.scheduleSequence(sequence.split('.')[-1],'eventinterpretaion_step')
1708  return
1709 

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

2056  def prepare_ENDJOB(self, sequence = 'endOfProcess'):
2057  self.loadDefaultOrSpecifiedCFF(sequence,self.ENDJOBDefaultCFF)
2058  self.scheduleSequenceAtEnd(sequence.split('.')[-1],'endjob_step')
2059  return
2060 

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

1590  def prepare_FILTER(self, sequence = None):
1591  ''' Enrich the schedule with a user defined filter sequence '''
1592 
1593  filterConfig=self.load(sequence.split('.')[0])
1594  filterSeq=sequence.split('.')[-1]
1595 
1596  class PrintAllModules(object):
1597  def __init__(self):
1598  self.inliner=''
1599  pass
1600  def enter(self,visitee):
1601  try:
1602  label=visitee.label()
1603 
1604  self.inliner=label+','+self.inliner
1605  except:
1606  pass
1607  def leave(self,v): pass
1608 
1609  expander=PrintAllModules()
1610  getattr(self.process,filterSeq).visit( expander )
1611  self._options.inlineObjets+=','+expander.inliner
1612  self._options.inlineObjets+=','+filterSeq
1613 
1614 
1615  self.scheduleSequence(filterSeq,'filtering_step')
1616  self.nextScheduleIsConditional=True
1617 
1618  self.productionFilterSequence = filterSeq
1619 
1620  return
1621 

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

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

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

1983  def prepare_HARVESTING(self, sequence = None):
1984  """ Enrich the process with harvesting step """
1985  self.DQMSaverCFF='Configuration/StandardSequences/DQMSaver'+self._options.harvesting+'_cff'
1986  self.loadAndRemember(self.DQMSaverCFF)
1987 
1988  harvestingConfig = self.loadDefaultOrSpecifiedCFF(sequence,self.HARVESTINGDefaultCFF)
1989  sequence = sequence.split('.')[-1]
1990 
1991  # decide which HARVESTING paths to use
1992  harvestingList = sequence.split("+")
1993  from DQMOffline.Configuration.autoDQM import autoDQM
1994  from Validation.Configuration.autoValidation import autoValidation
1995  import copy
1996  combined_mapping = copy.deepcopy( autoDQM )
1997  combined_mapping.update( autoValidation )
1998  self.expandMapping(harvestingList,combined_mapping,index=-1)
1999 
2000  if len(set(harvestingList))!=len(harvestingList):
2001  harvestingList=list(set(harvestingList))
2002  print("Duplicate entries for HARVESTING, using",harvestingList)
2003 
2004  for name in harvestingList:
2005  if not name in harvestingConfig.__dict__:
2006  print(name,"is not a possible harvesting type. Available are",harvestingConfig.__dict__.keys())
2007  # trigger hard error, like for other sequence types
2008  getattr(self.process, name)
2009  continue
2010  harvestingstream = getattr(harvestingConfig,name)
2011  if isinstance(harvestingstream,cms.Path):
2012  self.schedule.append(harvestingstream)
2013  self.blacklist_paths.append(harvestingstream)
2014  if isinstance(harvestingstream,cms.Sequence):
2015  setattr(self.process,name+"_step",cms.Path(harvestingstream))
2016  self.schedule.append(getattr(self.process,name+"_step"))
2017 
2018  self.scheduleSequence('DQMSaver','dqmsave_step')
2019  return
2020 

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

1492  def prepare_HLT(self, sequence = None):
1493  """ Enrich the schedule with the HLT simulation step"""
1494  if not sequence:
1495  print("no specification of the hlt menu has been given, should never happen")
1496  raise Exception('no HLT sequence provided')
1497 
1498  if '@' in sequence:
1499  # case where HLT:@something was provided
1500  from Configuration.HLT.autoHLT import autoHLT
1501  key = sequence[1:]
1502  if key in autoHLT:
1503  sequence = autoHLT[key]
1504  else:
1505  raise ValueError('no HLT mapping key "%s" found in autoHLT' % key)
1506 
1507  if ',' in sequence:
1508  #case where HLT:something:something was provided
1509  self.executeAndRemember('import HLTrigger.Configuration.Utilities')
1510  optionsForHLT = {}
1511  if self._options.scenario == 'HeavyIons':
1512  optionsForHLT['type'] = 'HIon'
1513  else:
1514  optionsForHLT['type'] = 'GRun'
1515  optionsForHLTConfig = ', '.join('%s=%s' % (key, repr(val)) for (key, val) in six.iteritems(optionsForHLT))
1516  if sequence == 'run,fromSource':
1517  if hasattr(self.process.source,'firstRun'):
1518  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.firstRun.value()),%s)'%(optionsForHLTConfig))
1519  elif hasattr(self.process.source,'setRunNumber'):
1520  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.setRunNumber.value()),%s)'%(optionsForHLTConfig))
1521  else:
1522  raise Exception('Cannot replace menu to load %s'%(sequence))
1523  else:
1524  self.executeAndRemember('process.loadHltConfiguration("%s",%s)'%(sequence.replace(',',':'),optionsForHLTConfig))
1525  else:
1526  self.loadAndRemember('HLTrigger/Configuration/HLT_%s_cff' % sequence)
1527 
1528  if self._options.isMC:
1529  self._options.customisation_file.append("HLTrigger/Configuration/customizeHLTforMC.customizeHLTforMC")
1530 
1531  if self._options.name != 'HLT':
1532  self.additionalCommands.append('from HLTrigger.Configuration.CustomConfigs import ProcessName')
1533  self.additionalCommands.append('process = ProcessName(process)')
1534  self.additionalCommands.append('')
1535  from HLTrigger.Configuration.CustomConfigs import ProcessName
1536  self.process = ProcessName(self.process)
1537 
1538  self.schedule.append(self.process.HLTSchedule)
1539  [self.blacklist_paths.append(path) for path in self.process.HLTSchedule if isinstance(path,(cms.Path,cms.EndPath))]
1540 
1541  #this is a fake, to be removed with fastim migration and HLT menu dump
1542  if self._options.fast:
1543  if not hasattr(self.process,'HLTEndSequence'):
1544  self.executeAndRemember("process.HLTEndSequence = cms.Sequence( process.dummyModule )")
1545 
1546 

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

1472  def prepare_L1(self, sequence = None):
1473  """ Enrich the schedule with the L1 simulation step"""
1474  assert(sequence == None)
1475  self.loadAndRemember(self.L1EMDefaultCFF)
1476  self.scheduleSequence('SimL1Emulator','L1simulation_step')
1477  return
1478 

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

1571  def prepare_L1HwVal(self, sequence = 'L1HwVal'):
1572  ''' Enrich the schedule with L1 HW validation '''
1573  self.loadDefaultOrSpecifiedCFF(sequence,self.L1HwValDefaultCFF)
1574  #self.scheduleSequence(sequence.split('.')[-1],'l1hwval_step')
1575  print('\n\n\n DEPRECATED this has no action \n\n\n')
1576  return
1577 

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

1578  def prepare_L1Reco(self, sequence = "L1Reco"):
1579  ''' Enrich the schedule with L1 reconstruction '''
1580  self.loadDefaultOrSpecifiedCFF(sequence,self.L1RecoDefaultCFF)
1581  self.scheduleSequence(sequence.split('.')[-1],'L1Reco_step')
1582  return
1583 

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

1479  def prepare_L1REPACK(self, sequence = None):
1480  """ 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"""
1481  supported = ['GT','GT1','GT2','GCTGT','Full','FullSimTP','FullMC','Full2015Data','uGT','CalouGT']
1482  if sequence in supported:
1483  self.loadAndRemember('Configuration/StandardSequences/SimL1EmulatorRepack_%s_cff'%sequence)
1484  if self._options.scenario == 'HeavyIons':
1485  self.renameInputTagsInSequence("SimL1Emulator","rawDataCollector","rawDataRepacker")
1486  self.scheduleSequence('SimL1Emulator','L1RePack_step')
1487  else:
1488  print("L1REPACK with '",sequence,"' is not supported! Supported choices are: ",supported)
1489  raise Exception('unsupported feature')
1490 
1491 

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

1584  def prepare_L1TrackTrigger(self, sequence = "L1TrackTrigger"):
1585  ''' Enrich the schedule with L1 reconstruction '''
1586  self.loadDefaultOrSpecifiedCFF(sequence,self.L1TrackTriggerDefaultCFF)
1587  self.scheduleSequence(sequence.split('.')[-1],'L1TrackTrigger_step')
1588  return
1589 

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

1301  def prepare_LHE(self, sequence = None):
1302  #load the fragment
1303 
1304  loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','').replace('/','.')
1305  print("Loading lhe fragment from",loadFragment)
1306  __import__(loadFragment)
1307  self.process.load(loadFragment)
1308 
1309  self._options.inlineObjets+=','+sequence
1310 
1311  getattr(self.process,sequence).nEvents = int(self._options.number)
1312 
1313  #schedule it
1314  self.process.lhe_step = cms.Path( getattr( self.process,sequence) )
1315  self.excludedPaths.append("lhe_step")
1316  self.schedule.append( self.process.lhe_step )
1317 

◆ prepare_NANO()

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

Definition at line 1675 of file ConfigBuilder.py.

1675  def prepare_NANO(self, sequence = "nanoAOD"):
1676  ''' Enrich the schedule with NANO '''
1677  self.loadDefaultOrSpecifiedCFF(sequence,self.NANODefaultCFF)
1678  self.scheduleSequence(sequence.split('.')[-1],'nanoAOD_step')
1679  custom = "nanoAOD_customizeData" if self._options.isData else "nanoAOD_customizeMC"
1680  self._options.customisation_file.insert(0,"PhysicsTools/NanoAOD/nano_cff."+custom)
1681  if self._options.hltProcess:
1682  if len(self._options.customise_commands) > 1:
1683  self._options.customise_commands = self._options.customise_commands + " \n"
1684  self._options.customise_commands = self._options.customise_commands + "process.unpackedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1685 

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

1686  def prepare_NANOGEN(self, sequence = "nanoAOD"):
1687  ''' Enrich the schedule with NANOGEN '''
1688  # TODO: Need to modify this based on the input file type
1689  fromGen = any([x in self.stepMap for x in ['LHE', 'GEN', 'AOD']])
1690  self.loadDefaultOrSpecifiedCFF(sequence,self.NANOGENDefaultCFF)
1691  self.scheduleSequence(sequence.split('.')[-1],'nanoAOD_step')
1692  custom = "customizeNanoGEN" if fromGen else "customizeNanoGENFromMini"
1693  if self._options.runUnscheduled:
1694  self._options.customisation_file_unsch.insert(0, '.'.join([self.NANOGENDefaultCFF, custom]))
1695  else:
1696  self._options.customisation_file.insert(0, '.'.join([self.NANOGENDefaultCFF, custom]))
1697 

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

1643  def prepare_PAT(self, sequence = "miniAOD"):
1644  ''' Enrich the schedule with PAT '''
1645  self.prepare_PATFILTER(self)
1646  self.loadDefaultOrSpecifiedCFF(sequence,self.PATDefaultCFF)
1647  self.labelsToAssociate.append('patTask')
1648  if self._options.isData:
1649  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllData")
1650  else:
1651  if self._options.fast:
1652  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMCFastSim")
1653  else:
1654  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMC")
1655 
1656  if self._options.hltProcess:
1657  if len(self._options.customise_commands) > 1:
1658  self._options.customise_commands = self._options.customise_commands + " \n"
1659  self._options.customise_commands = self._options.customise_commands + "process.patTrigger.processName = \""+self._options.hltProcess+"\"\n"
1660  self._options.customise_commands = self._options.customise_commands + "process.slimmedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1661  self._options.customise_commands = self._options.customise_commands + "process.patMuons.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1662 
1663 # self.renameHLTprocessInSequence(sequence)
1664 
1665  return
1666 

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

1565  def prepare_PATFILTER(self, sequence=None):
1566  self.loadAndRemember("PhysicsTools/PatAlgos/slimming/metFilterPaths_cff")
1567  from PhysicsTools.PatAlgos.slimming.metFilterPaths_cff import allMetFilterPaths
1568  for filt in allMetFilterPaths:
1569  self.schedule.append(getattr(self.process,'Flag_'+filt))
1570 

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

1667  def prepare_PATGEN(self, sequence = "miniGEN"):
1668  ''' Enrich the schedule with PATGEN '''
1669  self.loadDefaultOrSpecifiedCFF(sequence,self.PATGENDefaultCFF) #this is unscheduled
1670  self.labelsToAssociate.append('patGENTask')
1671  if self._options.isData:
1672  raise Exception("PATGEN step can only run on MC")
1673  return
1674 

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

1760  def prepare_POSTRECO(self, sequence = None):
1761  """ Enrich the schedule with the postreco step """
1762  self.loadAndRemember(self.POSTRECODefaultCFF)
1763  self.scheduleSequence('postreco_generator','postreco_step')
1764  return
1765 
1766 

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

1558  def prepare_RAW2DIGI(self, sequence = "RawToDigi"):
1559  self.loadDefaultOrSpecifiedCFF(sequence,self.RAW2DIGIDefaultCFF)
1560  self.scheduleSequence(sequence,'raw2digi_step')
1561  # if self._options.isRepacked:
1562  #self.renameInputTagsInSequence(sequence)
1563  return
1564 

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

1547  def prepare_RAW2RECO(self, sequence = None):
1548  if ','in sequence:
1549  seqReco=sequence.split(',')[1]
1550  seqDigi=sequence.split(',')[0]
1551  else:
1552  print("RAW2RECO requires two specifications",sequence,"insufficient")
1553 
1554  self.prepare_RAW2DIGI(seqDigi)
1555  self.prepare_RECO(seqReco)
1556  return
1557 

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

1622  def prepare_RECO(self, sequence = "reconstruction"):
1623  ''' Enrich the schedule with reconstruction '''
1624  self.loadDefaultOrSpecifiedCFF(sequence,self.RECODefaultCFF)
1625  self.scheduleSequence(sequence.split('.')[-1],'reconstruction_step')
1626  return
1627 

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

1634  def prepare_RECOBEFMIX(self, sequence = "reconstruction"):
1635  ''' Enrich the schedule with the part of reconstruction that is done before mixing in FastSim'''
1636  if not self._options.fast:
1637  print("ERROR: this step is only implemented for FastSim")
1638  sys.exit()
1639  self.loadDefaultOrSpecifiedCFF(self.RECOBEFMIXDefaultSeq,self.RECOBEFMIXDefaultCFF)
1640  self.scheduleSequence(sequence.split('.')[-1],'reconstruction_befmix_step')
1641  return
1642 

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

1628  def prepare_RECOSIM(self, sequence = "recosim"):
1629  ''' Enrich the schedule with reconstruction '''
1630  self.loadDefaultOrSpecifiedCFF(sequence,self.RECOSIMDefaultCFF)
1631  self.scheduleSequence(sequence.split('.')[-1],'recosim_step')
1632  return
1633 

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

1467  def prepare_REPACK(self, sequence = None):
1468  self.loadDefaultOrSpecifiedCFF(sequence,self.REPACKDefaultCFF)
1469  self.scheduleSequence(sequence.split('.')[-1],'digi2repack_step')
1470  return
1471 

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

1402  def prepare_SIM(self, sequence = None):
1403  """ Enrich the schedule with the simulation step"""
1404  self.loadDefaultOrSpecifiedCFF(sequence,self.SIMDefaultCFF)
1405  if not self._options.fast:
1406  if self._options.gflash==True:
1407  self.loadAndRemember("Configuration/StandardSequences/GFlashSIM_cff")
1408 
1409  if self._options.magField=='0T':
1410  self.executeAndRemember("process.g4SimHits.UseMagneticField = cms.bool(False)")
1411  else:
1412  if self._options.magField=='0T':
1413  self.executeAndRemember("process.fastSimProducer.detectorDefinition.magneticFieldZ = cms.untracked.double(0.)")
1414 
1415  self.scheduleSequence(sequence.split('.')[-1],'simulation_step')
1416  return
1417 

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

1710  def prepare_SKIM(self, sequence = "all"):
1711  ''' Enrich the schedule with skimming fragments'''
1712  skimConfig = self.loadDefaultOrSpecifiedCFF(sequence,self.SKIMDefaultCFF)
1713  sequence = sequence.split('.')[-1]
1714 
1715  skimlist=sequence.split('+')
1716 
1717  from Configuration.Skimming.autoSkim import autoSkim
1718  self.expandMapping(skimlist,autoSkim)
1719 
1720  #print "dictionnary for skims:",skimConfig.__dict__
1721  for skim in skimConfig.__dict__:
1722  skimstream = getattr(skimConfig,skim)
1723  if isinstance(skimstream,cms.Path):
1724  #black list the alca path so that they do not appear in the cfg
1725  self.blacklist_paths.append(skimstream)
1726  if (not isinstance(skimstream,cms.FilteredStream)):
1727  continue
1728  shortname = skim.replace('SKIMStream','')
1729  if (sequence=="all"):
1730  self.addExtraStream(skim,skimstream)
1731  elif (shortname in skimlist):
1732  self.addExtraStream(skim,skimstream)
1733  #add a DQM eventcontent for this guy
1734  if self._options.datatier=='DQM':
1735  self.process.load(self.EVTCONTDefaultCFF)
1736  skimstreamDQM = cms.FilteredStream(
1737  responsible = skimstream.responsible,
1738  name = skimstream.name+'DQM',
1739  paths = skimstream.paths,
1740  selectEvents = skimstream.selectEvents,
1741  content = self._options.datatier+'EventContent',
1742  dataTier = cms.untracked.string(self._options.datatier)
1743  )
1744  self.addExtraStream(skim+'DQM',skimstreamDQM)
1745  for i in range(skimlist.count(shortname)):
1746  skimlist.remove(shortname)
1747 
1748 
1749 
1750  if (skimlist.__len__()!=0 and sequence!="all"):
1751  print('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1752  raise Exception('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1753 

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

1754  def prepare_USER(self, sequence = None):
1755  ''' Enrich the schedule with a user defined sequence '''
1756  self.loadDefaultOrSpecifiedCFF(sequence,self.USERDefaultCFF)
1757  self.scheduleSequence(sequence.split('.')[-1],'user_step')
1758  return
1759 

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

1767  def prepare_VALIDATION(self, sequence = 'validation'):
1768  print(sequence,"in preparing validation")
1769  self.loadDefaultOrSpecifiedCFF(sequence,self.VALIDATIONDefaultCFF)
1770  from Validation.Configuration.autoValidation import autoValidation
1771  #in case VALIDATION:something:somethingelse -> something,somethingelse
1772  sequence=sequence.split('.')[-1]
1773  if sequence.find(',')!=-1:
1774  prevalSeqName=sequence.split(',')[0].split('+')
1775  valSeqName=sequence.split(',')[1].split('+')
1776  self.expandMapping(prevalSeqName,autoValidation,index=0)
1777  self.expandMapping(valSeqName,autoValidation,index=1)
1778  else:
1779  if '@' in sequence:
1780  prevalSeqName=sequence.split('+')
1781  valSeqName=sequence.split('+')
1782  self.expandMapping(prevalSeqName,autoValidation,index=0)
1783  self.expandMapping(valSeqName,autoValidation,index=1)
1784  else:
1785  postfix=''
1786  if sequence:
1787  postfix='_'+sequence
1788  prevalSeqName=['prevalidation'+postfix]
1789  valSeqName=['validation'+postfix]
1790  if not hasattr(self.process,valSeqName[0]):
1791  prevalSeqName=['']
1792  valSeqName=[sequence]
1793 
1794  def NFI(index):
1795 
1796  if index==0:
1797  return ''
1798  else:
1799  return '%s'%index
1800 
1801 
1802  #rename the HLT process in validation steps
1803  if ('HLT' in self.stepMap and not self._options.fast) or self._options.hltProcess:
1804  for s in valSeqName+prevalSeqName:
1805  if s:
1806  self.renameHLTprocessInSequence(s)
1807  for (i,s) in enumerate(prevalSeqName):
1808  if s:
1809  setattr(self.process,'prevalidation_step%s'%NFI(i), cms.Path( getattr(self.process, s)) )
1810  self.schedule.append(getattr(self.process,'prevalidation_step%s'%NFI(i)))
1811 
1812  for (i,s) in enumerate(valSeqName):
1813  setattr(self.process,'validation_step%s'%NFI(i), cms.EndPath( getattr(self.process, s)))
1814  self.schedule.append(getattr(self.process,'validation_step%s'%NFI(i)))
1815 
1816  #needed in case the miniAODValidation sequence is run starting from AODSIM
1817  if 'PAT' in self.stepMap and not 'RECO' in self.stepMap:
1818  return
1819 
1820  if not 'DIGI' in self.stepMap and not self._options.fast and not any(map( lambda s : s.startswith('genvalid'), valSeqName)):
1821  if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True:
1822  self._options.restoreRNDSeeds=True
1823 
1824  if not 'DIGI' in self.stepMap and not self._options.fast:
1825  self.executeAndRemember("process.mix.playback = True")
1826  self.executeAndRemember("process.mix.digitizers = cms.PSet()")
1827  self.executeAndRemember("for a in process.aliases: delattr(process, a)")
1828  self._options.customisation_file.append("SimGeneral/MixingModule/fullMixCustomize_cff.setCrossingFrameOn")
1829 
1830  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
1831  #will get in the schedule, smoothly
1832  for (i,s) in enumerate(valSeqName):
1833  getattr(self.process,'validation_step%s'%NFI(i)).insert(0, self.process.genstepfilter)
1834 
1835  return
1836 
1837 

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

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

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

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

◆ renameHLTprocessInSequence()

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

Definition at line 1907 of file ConfigBuilder.py.

1907  def renameHLTprocessInSequence(self,sequence,proc=None,HLTprocess='HLT'):
1908  if self._options.hltProcess:
1909  proc=self._options.hltProcess
1910  else:
1911  proc=self.process.name_()
1912  if proc==HLTprocess: return
1913  # look up all module in dqm sequence
1914  print("replacing %s process name - sequence %s will use '%s'" % (HLTprocess,sequence, proc))
1915  getattr(self.process,sequence).visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor(HLTprocess,proc,whitelist = ("subSystemFolder",)))
1916  if 'from Configuration.Applications.ConfigBuilder import ConfigBuilder' not in self.additionalCommands:
1917  self.additionalCommands.append('from Configuration.Applications.ConfigBuilder import ConfigBuilder')
1918  self.additionalCommands.append('process.%s.visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor("%s", "%s", whitelist = ("subSystemFolder",)))'% (sequence,HLTprocess, proc))
1919 
1920 

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

1897  def renameInputTagsInSequence(self,sequence,oldT="rawDataCollector",newT="rawDataRepacker"):
1898  print("Replacing all InputTag %s => %s"%(oldT,newT))
1899  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
1900  massSearchReplaceAnyInputTag(getattr(self.process,sequence),oldT,newT)
1901  loadMe='from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag'
1902  if not loadMe in self.additionalCommands:
1903  self.additionalCommands.append(loadMe)
1904  self.additionalCommands.append('massSearchReplaceAnyInputTag(process.%s,"%s","%s",False,True)'%(sequence,oldT,newT))
1905 

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

1204  def scheduleSequence(self,seq,prefix,what='Path'):
1205  if '*' in seq:
1206  #create only one path with all sequences in it
1207  for i,s in enumerate(seq.split('*')):
1208  if i==0:
1209  setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, s) ))
1210  else:
1211  p=getattr(self.process,prefix)
1212  tmp = getattr(self.process, s)
1213  if isinstance(tmp, cms.Task):
1214  p.associate(tmp)
1215  else:
1216  p+=tmp
1217  self.schedule.append(getattr(self.process,prefix))
1218  return
1219  else:
1220  #create as many path as many sequences
1221  if not '+' in seq:
1222  if self.nextScheduleIsConditional:
1223  self.conditionalPaths.append(prefix)
1224  setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, seq) ))
1225  self.schedule.append(getattr(self.process,prefix))
1226  else:
1227  for i,s in enumerate(seq.split('+')):
1228  sn=prefix+'%d'%(i)
1229  setattr(self.process,sn,getattr(cms,what)( getattr(self.process, s) ))
1230  self.schedule.append(getattr(self.process,sn))
1231  return
1232 

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

1233  def scheduleSequenceAtEnd(self,seq,prefix):
1234  self.scheduleSequence(seq,prefix,what='EndPath')
1235  return
1236 

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

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ ALCADefaultCFF

ConfigBuilder.ConfigBuilder.ALCADefaultCFF

◆ ALCADefaultSeq

ConfigBuilder.ConfigBuilder.ALCADefaultSeq

Definition at line 960 of file ConfigBuilder.py.

◆ ALCAHARVESTDefaultCFF

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultCFF

Definition at line 948 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

◆ ALCAHARVESTDefaultSeq

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultSeq

Definition at line 971 of file ConfigBuilder.py.

◆ AlCaPaths

ConfigBuilder.ConfigBuilder.AlCaPaths

◆ blacklist_paths

ConfigBuilder.ConfigBuilder.blacklist_paths

◆ CFWRITERDefaultCFF

ConfigBuilder.ConfigBuilder.CFWRITERDefaultCFF

Definition at line 951 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_CFWRITER().

◆ CFWRITERDefaultSeq

ConfigBuilder.ConfigBuilder.CFWRITERDefaultSeq

Definition at line 972 of file ConfigBuilder.py.

◆ conditionalPaths

ConfigBuilder.ConfigBuilder.conditionalPaths

◆ ConditionsDefaultCFF

ConfigBuilder.ConfigBuilder.ConditionsDefaultCFF

Definition at line 950 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addConditions().

◆ DATAMIXDefaultCFF

ConfigBuilder.ConfigBuilder.DATAMIXDefaultCFF

Definition at line 955 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DATAMIX().

◆ DATAMIXDefaultSeq

ConfigBuilder.ConfigBuilder.DATAMIXDefaultSeq

Definition at line 965 of file ConfigBuilder.py.

◆ DIGI2RAWDefaultCFF

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultCFF

Definition at line 928 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

◆ DIGI2RAWDefaultSeq

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultSeq

Definition at line 966 of file ConfigBuilder.py.

◆ DIGIDefaultCFF

ConfigBuilder.ConfigBuilder.DIGIDefaultCFF

Definition at line 927 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI().

◆ DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.DIGIDefaultSeq

Definition at line 964 of file ConfigBuilder.py.

◆ DQMDefaultSeq

ConfigBuilder.ConfigBuilder.DQMDefaultSeq

Definition at line 984 of file ConfigBuilder.py.

◆ DQMOFFLINEDefaultCFF

ConfigBuilder.ConfigBuilder.DQMOFFLINEDefaultCFF

Definition at line 946 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

◆ DQMSaverCFF

ConfigBuilder.ConfigBuilder.DQMSaverCFF

Definition at line 1985 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_HARVESTING().

◆ EIDefaultCFF

ConfigBuilder.ConfigBuilder.EIDefaultCFF

Definition at line 941 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_EI().

◆ EIDefaultSeq

ConfigBuilder.ConfigBuilder.EIDefaultSeq

Definition at line 981 of file ConfigBuilder.py.

◆ ENDJOBDefaultCFF

ConfigBuilder.ConfigBuilder.ENDJOBDefaultCFF

Definition at line 949 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ENDJOB().

◆ ENDJOBDefaultSeq

ConfigBuilder.ConfigBuilder.ENDJOBDefaultSeq

Definition at line 986 of file ConfigBuilder.py.

◆ EVTCONTDefaultCFF

ConfigBuilder.ConfigBuilder.EVTCONTDefaultCFF

◆ excludedPaths

ConfigBuilder.ConfigBuilder.excludedPaths

Definition at line 268 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ GENDefaultCFF

ConfigBuilder.ConfigBuilder.GENDefaultCFF

Definition at line 925 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GENDefaultSeq

ConfigBuilder.ConfigBuilder.GENDefaultSeq

Definition at line 962 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GeometryCFF

ConfigBuilder.ConfigBuilder.GeometryCFF

Definition at line 1057 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ geometryDBLabel

ConfigBuilder.ConfigBuilder.geometryDBLabel

Definition at line 1058 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ HARVESTINGDefaultCFF

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultCFF

Definition at line 947 of file ConfigBuilder.py.

◆ HARVESTINGDefaultSeq

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultSeq

Definition at line 970 of file ConfigBuilder.py.

◆ HLTDefaultCFF

ConfigBuilder.ConfigBuilder.HLTDefaultCFF

Definition at line 931 of file ConfigBuilder.py.

◆ HLTDefaultSeq

ConfigBuilder.ConfigBuilder.HLTDefaultSeq

Definition at line 967 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 1598 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

◆ L1DefaultSeq

ConfigBuilder.ConfigBuilder.L1DefaultSeq

Definition at line 968 of file ConfigBuilder.py.

◆ L1EMDefaultCFF

ConfigBuilder.ConfigBuilder.L1EMDefaultCFF

Definition at line 929 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1().

◆ L1HwValDefaultCFF

ConfigBuilder.ConfigBuilder.L1HwValDefaultCFF

Definition at line 945 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1HwVal().

◆ L1HwValDefaultSeq

ConfigBuilder.ConfigBuilder.L1HwValDefaultSeq

Definition at line 983 of file ConfigBuilder.py.

◆ L1MENUDefaultCFF

ConfigBuilder.ConfigBuilder.L1MENUDefaultCFF

Definition at line 930 of file ConfigBuilder.py.

◆ L1RecoDefaultCFF

ConfigBuilder.ConfigBuilder.L1RecoDefaultCFF

Definition at line 934 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1Reco().

◆ L1RecoDefaultSeq

ConfigBuilder.ConfigBuilder.L1RecoDefaultSeq

Definition at line 974 of file ConfigBuilder.py.

◆ L1REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.L1REPACKDefaultSeq

Definition at line 969 of file ConfigBuilder.py.

◆ L1TrackTriggerDefaultCFF

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultCFF

◆ L1TrackTriggerDefaultSeq

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultSeq

Definition at line 975 of file ConfigBuilder.py.

◆ labelsToAssociate

ConfigBuilder.ConfigBuilder.labelsToAssociate

◆ LHEDefaultSeq

ConfigBuilder.ConfigBuilder.LHEDefaultSeq

Definition at line 961 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ magFieldCFF

ConfigBuilder.ConfigBuilder.magFieldCFF

Definition at line 1053 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ NANODefaultCFF

ConfigBuilder.ConfigBuilder.NANODefaultCFF

Definition at line 939 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultSeq

ConfigBuilder.ConfigBuilder.NANODefaultSeq

Definition at line 992 of file ConfigBuilder.py.

◆ NANOGENDefaultCFF

ConfigBuilder.ConfigBuilder.NANOGENDefaultCFF

Definition at line 940 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANOGEN().

◆ NANOGENDefaultSeq

ConfigBuilder.ConfigBuilder.NANOGENDefaultSeq

Definition at line 991 of file ConfigBuilder.py.

◆ nextScheduleIsConditional

ConfigBuilder.ConfigBuilder.nextScheduleIsConditional

put the filtering path in the schedule

Definition at line 266 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequence().

◆ PATDefaultCFF

ConfigBuilder.ConfigBuilder.PATDefaultCFF

Definition at line 938 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PAT().

◆ PATDefaultSeq

ConfigBuilder.ConfigBuilder.PATDefaultSeq

Definition at line 988 of file ConfigBuilder.py.

◆ PATGENDefaultCFF

ConfigBuilder.ConfigBuilder.PATGENDefaultCFF

Definition at line 1004 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

◆ PATGENDefaultSeq

ConfigBuilder.ConfigBuilder.PATGENDefaultSeq

Definition at line 989 of file ConfigBuilder.py.

◆ POSTRECODefaultCFF

ConfigBuilder.ConfigBuilder.POSTRECODefaultCFF

Definition at line 943 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_POSTRECO().

◆ POSTRECODefaultSeq

ConfigBuilder.ConfigBuilder.POSTRECODefaultSeq

Definition at line 982 of file ConfigBuilder.py.

◆ process

ConfigBuilder.ConfigBuilder.process

◆ productionFilterSequence

ConfigBuilder.ConfigBuilder.productionFilterSequence

put it before all the other paths

Definition at line 264 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 932 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI().

◆ RAW2DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.RAW2DIGIDefaultSeq

Definition at line 973 of file ConfigBuilder.py.

◆ RAW2RECODefaultSeq

ConfigBuilder.ConfigBuilder.RAW2RECODefaultSeq

Definition at line 1047 of file ConfigBuilder.py.

◆ RECOBEFMIXDefaultCFF

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultCFF

Definition at line 1108 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECOBEFMIXDefaultSeq

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultSeq

Definition at line 1109 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECODefaultCFF

ConfigBuilder.ConfigBuilder.RECODefaultCFF

Definition at line 936 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECO().

◆ RECODefaultSeq

ConfigBuilder.ConfigBuilder.RECODefaultSeq

Definition at line 977 of file ConfigBuilder.py.

◆ RECOSIMDefaultCFF

ConfigBuilder.ConfigBuilder.RECOSIMDefaultCFF

Definition at line 937 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOSIM().

◆ RECOSIMDefaultSeq

ConfigBuilder.ConfigBuilder.RECOSIMDefaultSeq

Definition at line 980 of file ConfigBuilder.py.

◆ REDIGIDefaultSeq

ConfigBuilder.ConfigBuilder.REDIGIDefaultSeq

Definition at line 1124 of file ConfigBuilder.py.

◆ REPACKDefaultCFF

ConfigBuilder.ConfigBuilder.REPACKDefaultCFF

Definition at line 952 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_REPACK().

◆ REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.REPACKDefaultSeq

Definition at line 987 of file ConfigBuilder.py.

◆ runsAndWeights

ConfigBuilder.ConfigBuilder.runsAndWeights

drop LHEXMLStringProduct on input to save memory if appropriate

Definition at line 479 of file ConfigBuilder.py.

◆ schedule

ConfigBuilder.ConfigBuilder.schedule

◆ SIMDefaultCFF

ConfigBuilder.ConfigBuilder.SIMDefaultCFF

Definition at line 926 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SIM().

◆ SIMDefaultSeq

ConfigBuilder.ConfigBuilder.SIMDefaultSeq

Definition at line 963 of file ConfigBuilder.py.

◆ SimGeometryCFF

ConfigBuilder.ConfigBuilder.SimGeometryCFF

Definition at line 1083 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ SKIMDefaultCFF

ConfigBuilder.ConfigBuilder.SKIMDefaultCFF

Definition at line 942 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

◆ stepKeys

ConfigBuilder.ConfigBuilder.stepKeys

Definition at line 224 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ stepMap

ConfigBuilder.ConfigBuilder.stepMap

◆ USERDefaultCFF

ConfigBuilder.ConfigBuilder.USERDefaultCFF

Definition at line 1050 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_USER().

◆ USERDefaultSeq

ConfigBuilder.ConfigBuilder.USERDefaultSeq

Definition at line 1049 of file ConfigBuilder.py.

◆ VALIDATIONDefaultCFF

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultCFF

Definition at line 944 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

◆ VALIDATIONDefaultSeq

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultSeq

Definition at line 985 of file ConfigBuilder.py.

◆ with_input

ConfigBuilder.ConfigBuilder.with_input

Definition at line 248 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ with_output

ConfigBuilder.ConfigBuilder.with_output

Definition at line 243 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

helpers.associatePatAlgosToolsTask
def associatePatAlgosToolsTask(process)
Definition: helpers.py:25
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:5
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:41
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:100
ConfigBuilder.filesFromDASQuery
def filesFromDASQuery(query, option="", s=None)
Definition: ConfigBuilder.py:134
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
any
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:38
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:51
svgfig.load
def load(fileName)
Definition: svgfig.py:547
GlobalTag
Definition: GlobalTag.h:4
DictTypes.SortedKeysDict
Definition: DictTypes.py:3
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
Mixing.defineMixing
def defineMixing(dict)
Definition: Mixing.py:188
Exception
mps_setup.append
append
Definition: mps_setup.py:85
createfilelist.int
int
Definition: createfilelist.py:10
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
metFilterPaths_cff
helpers
ConfigBuilder.anyOf
def anyOf(listOfKeys, dict, opt=None)
Definition: ConfigBuilder.py:182
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:614
ConfigBuilder.dumpPython
def dumpPython(process, name)
Definition: ConfigBuilder.py:92
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