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 heapProfileOptions (self)
 
def load (self, includeFile)
 
def loadAndRemember (self, includeFile)
 
def loadDefaultOrSpecifiedCFF (self, stepSpec, defaultCFF, defaultSEQ='')
 
def prepare (self, doChecking=False)
 
def prepare_ALCA (self, stepSpec=None, workflow='full')
 
def prepare_ALCAHARVEST (self, stepSpec=None)
 
def prepare_ALCAOUTPUT (self, stepSpec=None)
 
def prepare_ALCAPRODUCER (self, stepSpec=None)
 
def prepare_CFWRITER (self, stepSpec=None)
 
def prepare_DATAMIX (self, stepSpec=None)
 
def prepare_DIGI (self, stepSpec=None)
 
def prepare_DIGI2RAW (self, stepSpec=None)
 
def prepare_DQM (self, stepSpec='DQMOffline')
 
def prepare_ENDJOB (self, stepSpec='endOfProcess')
 
def prepare_FILTER (self, stepSpec=None)
 
def prepare_GEN (self, stepSpec=None)
 
def prepare_HARVESTING (self, stepSpec=None)
 
def prepare_HLT (self, stepSpec=None)
 
def prepare_L1 (self, stepSpec=None)
 
def prepare_L1HwVal (self, stepSpec='L1HwVal')
 
def prepare_L1Reco (self, stepSpec="L1Reco")
 
def prepare_L1REPACK (self, stepSpec=None)
 
def prepare_L1TrackTrigger (self, stepSpec="L1TrackTrigger")
 
def prepare_LHE (self, stepSpec=None)
 
def prepare_NANO (self, stepSpec='')
 
def prepare_NANOGEN (self, stepSpec="nanoAOD")
 
def prepare_PAT (self, stepSpec="miniAOD")
 
def prepare_PATFILTER (self, stepSpec=None)
 
def prepare_PATGEN (self, stepSpec="miniGEN")
 
def prepare_POSTRECO (self, stepSpec=None)
 
def prepare_RAW2DIGI (self, stepSpec="RawToDigi")
 
def prepare_RAW2RECO (self, stepSpec=None)
 
def prepare_RECO (self, stepSpec="reconstruction")
 
def prepare_RECOBEFMIX (self, stepSpec="reconstruction")
 
def prepare_RECOSIM (self, stepSpec="recosim")
 
def prepare_REPACK (self, stepSpec=None)
 
def prepare_SIM (self, stepSpec=None)
 
def prepare_SKIM (self, stepSpec="all")
 
def prepare_USER (self, stepSpec=None)
 
def prepare_VALIDATION (self, stepSpec='validation')
 
def profileOptions (self)
 
def renameHLTprocessInSequence (self, sequence, proc=None, HLTprocess='HLT', verbosityLevel=1)
 
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
 
 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
 
 NANODefaultCustom
 
 NANODefaultSeq
 
 NANOGENDefaultCFF
 
 NANOGENDefaultSeq
 
 nextScheduleIsConditional
 put the filtering path in the schedule More...
 
 PATDefaultCFF
 
 PATDefaultSeq
 
 PATGENDefaultCFF
 
 PATGENDefaultSeq
 
 POSTRECODefaultCFF
 
 POSTRECODefaultSeq
 
 process
 adding standard sequences might change the inputEventContent option and therefore needs to be finalized after More...
 
 productionFilterSequence
 put it before all the other paths More...
 
 pythonCfgCode
 
 RAW2DIGIDefaultCFF
 
 RAW2DIGIDefaultSeq
 
 RAW2RECODefaultSeq
 
 RECOBEFMIXDefaultCFF
 
 RECOBEFMIXDefaultSeq
 
 RECODefaultCFF
 
 RECODefaultSeq
 
 RECOSIMDefaultCFF
 
 RECOSIMDefaultSeq
 
 REDIGIDefaultSeq
 
 REPACKDefaultCFF
 
 REPACKDefaultSeq
 
 runsAndWeights
 drop LHEXMLStringProduct on input to save memory if appropriate More...
 
 runsAndWeightsInt
 
 schedule
 
 scheduleIndexOfFirstHLTPath
 
 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 199 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 202 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

202  def __init__(self, options, process = None, with_output = False, with_input = False ):
203  """options taken from old cmsDriver and optparse """
204 
205  options.outfile_name = options.dirout+options.fileout
206 
207  self._options = options
208 
209  if self._options.isData and options.isMC:
210  raise Exception("ERROR: You may specify only --data or --mc, not both")
211  #if not self._options.conditions:
212  # raise Exception("ERROR: No conditions given!\nPlease specify conditions. E.g. via --conditions=IDEAL_30X::All")
213 
214  # check that MEtoEDMConverter (running in ENDJOB) and DQMIO don't run in the same job
215  if 'ENDJOB' in self._options.step:
216  if (hasattr(self._options,"outputDefinition") and \
217  self._options.outputDefinition != '' and \
218  any(anyOf(['t','tier','dataTier'],outdic) == 'DQMIO' for outdic in eval(self._options.outputDefinition))) or \
219  (hasattr(self._options,"datatier") and \
220  self._options.datatier and \
221  'DQMIO' in self._options.datatier):
222  print("removing ENDJOB from steps since not compatible with DQMIO dataTier")
223  self._options.step=self._options.step.replace(',ENDJOB','')
224 
225 
226 
227  # what steps are provided by this class?
228  stepList = [re.sub(r'^prepare_', '', methodName) for methodName in ConfigBuilder.__dict__ if methodName.startswith('prepare_')]
229  self.stepMap={}
230  self.stepKeys=[]
231  for step in self._options.step.split(","):
232  if step=='': continue
233  stepParts = step.split(":")
234  stepName = stepParts[0]
235  if stepName not in stepList and not stepName.startswith('re'):
236  raise ValueError("Step {} unknown. Available are {}".format( stepName , sorted(stepList)))
237  if len(stepParts)==1:
238  self.stepMap[stepName]=""
239  elif len(stepParts)==2:
240  self.stepMap[stepName]=stepParts[1].split('+')
241  elif len(stepParts)==3:
242  self.stepMap[stepName]=(stepParts[2].split('+'),stepParts[1])
243  else:
244  raise ValueError(f"Step definition {step} invalid")
245  self.stepKeys.append(stepName)
246 
247  #print(f"map of steps is: {self.stepMap}")
248 
249  self.with_output = with_output
250  self.process=process
251 
252  if hasattr(self._options,"no_output_flag") and self._options.no_output_flag:
253  self.with_output = False
254  self.with_input = with_input
255  self.imports = []
256  self.create_process()
257  self.define_Configs()
258  self.schedule = list()
259  self.scheduleIndexOfFirstHLTPath = None
260 
261  # we are doing three things here:
262  # creating a process to catch errors
263  # building the code to re-create the process
264 
265  self.additionalCommands = []
266  # TODO: maybe a list of to be dumped objects would help as well
267  self.blacklist_paths = []
268  self.addedObjects = []
269  self.additionalOutputs = {}
270 
271  self.productionFilterSequence = None
272  self.labelsToAssociate=[]
273  self.nextScheduleIsConditional=False
274  self.conditionalPaths=[]
275  self.excludedPaths=[]
276 
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)
def anyOf(listOfKeys, dict, opt=None)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Member Function Documentation

◆ addCommon()

def ConfigBuilder.ConfigBuilder.addCommon (   self)

Definition at line 388 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addedObjects, mps_setup.append, ConfigBuilder.ConfigBuilder.heapProfileOptions(), 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().

388  def addCommon(self):
389  if 'HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys():
390  self.process.options.Rethrow = ['ProductNotFound']
391  self.process.options.fileMode = 'FULLMERGE'
392 
393  self.addedObjects.append(("","options"))
394 
395  if self._options.lazy_download:
396  self.process.AdaptorConfig = cms.Service("AdaptorConfig",
397  stats = cms.untracked.bool(True),
398  enable = cms.untracked.bool(True),
399  cacheHint = cms.untracked.string("lazy-download"),
400  readHint = cms.untracked.string("read-ahead-buffered")
401  )
402  self.addedObjects.append(("Setup lazy download","AdaptorConfig"))
403 
404  #self.process.cmsDriverCommand = cms.untracked.PSet( command=cms.untracked.string('cmsDriver.py '+self._options.arguments) )
405  #self.addedObjects.append(("what cmsDriver command was used","cmsDriverCommand"))
406 
407  if self._options.profile:
408  (start, interval, eventFormat, jobFormat)=self.profileOptions()
409  self.process.IgProfService = cms.Service("IgProfService",
410  reportFirstEvent = cms.untracked.int32(start),
411  reportEventInterval = cms.untracked.int32(interval),
412  reportToFileAtPostEvent = cms.untracked.string("| gzip -c > %s"%(eventFormat)),
413  reportToFileAtPostEndJob = cms.untracked.string("| gzip -c > %s"%(jobFormat)))
414  self.addedObjects.append(("Setup IGProf Service for profiling","IgProfService"))
415 
416  if self._options.heap_profile:
417  (start, interval, eventFormat, jobFormat)=self.heapProfileOptions()
418  self.process.JeProfService = cms.Service("JeProfService",
419  reportFirstEvent = cms.untracked.int32(start),
420  reportEventInterval = cms.untracked.int32(interval),
421  reportToFileAtPostEvent = cms.untracked.string("%s"%(eventFormat)),
422  reportToFileAtPostEndJob = cms.untracked.string("%s"%(jobFormat)))
423  self.addedObjects.append(("Setup JeProf Service for heap profiling","JeProfService"))
424 

◆ addConditions()

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

Definition at line 893 of file ConfigBuilder.py.

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().

893  def addConditions(self):
894  """Add conditions to the process"""
895  if not self._options.conditions: return
896 
897  if 'FrontierConditions_GlobalTag' in self._options.conditions:
898  print('using FrontierConditions_GlobalTag in --conditions is not necessary anymore and will be deprecated soon. please update your command line')
899  self._options.conditions = self._options.conditions.replace("FrontierConditions_GlobalTag,",'')
900 
901  self.loadAndRemember(self.ConditionsDefaultCFF)
902  from Configuration.AlCa.GlobalTag import GlobalTag
903  self.process.GlobalTag = GlobalTag(self.process.GlobalTag, self._options.conditions, self._options.custom_conditions)
904  self.additionalCommands.append('from Configuration.AlCa.GlobalTag import GlobalTag')
905  self.additionalCommands.append('process.GlobalTag = GlobalTag(process.GlobalTag, %s, %s)' % (repr(self._options.conditions), repr(self._options.custom_conditions)))
906 
907 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ addCustomise()

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

Definition at line 908 of file ConfigBuilder.py.

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

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

908  def addCustomise(self,unsch=0):
909  """Include the customise code """
910 
911  custOpt=[]
912  if unsch==0:
913  for c in self._options.customisation_file:
914  custOpt.extend(c.split(","))
915  else:
916  for c in self._options.customisation_file_unsch:
917  custOpt.extend(c.split(","))
918 
919  custMap=DictTypes.SortedKeysDict()
920  for opt in custOpt:
921  if opt=='': continue
922  if opt.count('.')>1:
923  raise Exception("more than . in the specification:"+opt)
924  fileName=opt.split('.')[0]
925  if opt.count('.')==0: rest='customise'
926  else:
927  rest=opt.split('.')[1]
928  if rest=='py': rest='customise' #catch the case of --customise file.py
929 
930  if fileName in custMap:
931  custMap[fileName].extend(rest.split('+'))
932  else:
933  custMap[fileName]=rest.split('+')
934 
935  if len(custMap)==0:
936  final_snippet='\n'
937  else:
938  final_snippet='\n# customisation of the process.\n'
939 
940  allFcn=[]
941  for opt in custMap:
942  allFcn.extend(custMap[opt])
943  for fcn in allFcn:
944  if allFcn.count(fcn)!=1:
945  raise Exception("cannot specify twice "+fcn+" as a customisation method")
946 
947  for f in custMap:
948  # let python search for that package and do syntax checking at the same time
949  packageName = f.replace(".py","").replace("/",".")
950  __import__(packageName)
951  package = sys.modules[packageName]
952 
953  # now ask the package for its definition and pick .py instead of .pyc
954  customiseFile = re.sub(r'\.pyc$', '.py', package.__file__)
955 
956  final_snippet+='\n# Automatic addition of the customisation function from '+packageName+'\n'
957  if self._options.inline_custom:
958  for line in file(customiseFile,'r'):
959  if "import FWCore.ParameterSet.Config" in line:
960  continue
961  final_snippet += line
962  else:
963  final_snippet += 'from %s import %s \n'%(packageName,','.join(custMap[f]))
964  for fcn in custMap[f]:
965  print("customising the process with",fcn,"from",f)
966  if not hasattr(package,fcn):
967  #bound to fail at run time
968  raise Exception("config "+f+" has no function "+fcn)
969  #execute the command
970  self.process=getattr(package,fcn)(self.process)
971  #and print it in the configuration
972  final_snippet += "\n#call to customisation function "+fcn+" imported from "+packageName
973  final_snippet += "\nprocess = %s(process)\n"%(fcn,)
974 
975  if len(custMap)!=0:
976  final_snippet += '\n# End of customisation functions\n'
977 
978 
979  return final_snippet
980 
def replace(string, replacements)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ addCustomiseCmdLine()

def ConfigBuilder.ConfigBuilder.addCustomiseCmdLine (   self)

Definition at line 981 of file ConfigBuilder.py.

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

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

981  def addCustomiseCmdLine(self):
982  final_snippet='\n# Customisation from command line\n'
983  if self._options.customise_commands:
984  import string
985  for com in self._options.customise_commands.split('\\n'):
986  com=com.lstrip()
987  self.executeAndRemember(com)
988  final_snippet +='\n'+com
989 
990  return final_snippet
991 

◆ addExtraStream()

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

Definition at line 1211 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

1211  def addExtraStream(self, name, stream, workflow='full'):
1212  # define output module and go from there
1213  output = cms.OutputModule("PoolOutputModule")
1214  if stream.selectEvents.parameters_().__len__()!=0:
1215  output.SelectEvents = stream.selectEvents
1216  else:
1217  output.SelectEvents = cms.untracked.PSet()
1218  output.SelectEvents.SelectEvents=cms.vstring()
1219  if isinstance(stream.paths,tuple):
1220  for path in stream.paths:
1221  output.SelectEvents.SelectEvents.append(path.label())
1222  else:
1223  output.SelectEvents.SelectEvents.append(stream.paths.label())
1224 
1225 
1226 
1227  if isinstance(stream.content,str):
1228  evtPset=getattr(self.process,stream.content)
1229  for p in evtPset.parameters_():
1230  setattr(output,p,getattr(evtPset,p))
1231  if not self._options.inlineEventContent:
1232  def doNotInlineEventContent(instance,label = "process."+stream.content+".outputCommands"):
1233  return label
1234  output.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
1235  else:
1236  output.outputCommands = stream.content
1237 
1238 
1239  output.fileName = cms.untracked.string(self._options.dirout+stream.name+'.root')
1240 
1241  output.dataset = cms.untracked.PSet( dataTier = stream.dataTier,
1242  filterName = cms.untracked.string(stream.name))
1243 
1244  if self._options.filtername:
1245  output.dataset.filterName= cms.untracked.string(self._options.filtername+"_"+stream.name)
1246 
1247  #add an automatic flushing to limit memory consumption
1248  output.eventAutoFlushCompressedSize=cms.untracked.int32(5*1024*1024)
1249 
1250  if workflow in ("producers,full"):
1251  if isinstance(stream.paths,tuple):
1252  for path in stream.paths:
1253  self.schedule.append(path)
1254  else:
1255  self.schedule.append(stream.paths)
1256 
1257 
1258  # in case of relvals we don't want to have additional outputs
1259  if (not self._options.relval) and workflow in ("full","output"):
1260  self.additionalOutputs[name] = output
1261  setattr(self.process,name,output)
1262 
1263  if workflow == 'output':
1264  # adjust the select events to the proper trigger results from previous process
1265  filterList = output.SelectEvents.SelectEvents
1266  for i, filter in enumerate(filterList):
1267  filterList[i] = filter+":"+self._options.triggerResultsProcess
1268 
1269  return output
1270 

◆ addMaxEvents()

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

Definition at line 425 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare().

425  def addMaxEvents(self):
426  """Here we decide how many evts will be processed"""
427  self.process.maxEvents.input = self._options.number
428  if self._options.number_out:
429  self.process.maxEvents.output = self._options.number_out
430  self.addedObjects.append(("","maxEvents"))
431 

◆ addOutput()

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

Definition at line 584 of file ConfigBuilder.py.

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().

584  def addOutput(self):
585  """ Add output module to the process """
586  result=""
587  if self._options.outputDefinition:
588  if self._options.datatier:
589  print("--datatier & --eventcontent options ignored")
590 
591  #new output convention with a list of dict
592  outList = eval(self._options.outputDefinition)
593  for (id,outDefDict) in enumerate(outList):
594  outDefDictStr=outDefDict.__str__()
595  if not isinstance(outDefDict,dict):
596  raise Exception("--output needs to be passed a list of dict"+self._options.outputDefinition+" is invalid")
597  #requires option: tier
598  theTier=anyOf(['t','tier','dataTier'],outDefDict)
599  #optional option: eventcontent, filtername, selectEvents, moduleLabel, filename
600 
601  theStreamType=anyOf(['e','ec','eventContent','streamType'],outDefDict,theTier)
602  theFilterName=anyOf(['f','ftN','filterName'],outDefDict,'')
603  theSelectEvent=anyOf(['s','sE','selectEvents'],outDefDict,'')
604  theModuleLabel=anyOf(['l','mL','moduleLabel'],outDefDict,'')
605  theExtraOutputCommands=anyOf(['o','oC','outputCommands'],outDefDict,'')
606  # module label has a particular role
607  if not theModuleLabel:
608  tryNames=[theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+'output',
609  theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+theFilterName+'output',
610  theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+theFilterName+theSelectEvent.split(',')[0].replace(':','for').replace(' ','')+'output'
611  ]
612  for name in tryNames:
613  if not hasattr(self.process,name):
614  theModuleLabel=name
615  break
616  if not theModuleLabel:
617  raise Exception("cannot find a module label for specification: "+outDefDictStr)
618  if id==0:
619  defaultFileName=self._options.outfile_name
620  else:
621  defaultFileName=self._options.outfile_name.replace('.root','_in'+theTier+'.root')
622 
623  theFileName=self._options.dirout+anyOf(['fn','fileName'],outDefDict,defaultFileName)
624  if not theFileName.endswith('.root'):
625  theFileName+='.root'
626 
627  if len(outDefDict):
628  raise Exception("unused keys from --output options: "+','.join(outDefDict.keys()))
629  if theStreamType=='DQMIO': theStreamType='DQM'
630  if theStreamType=='ALL':
631  theEventContent = cms.PSet(outputCommands = cms.untracked.vstring('keep *'))
632  else:
633  theEventContent = getattr(self.process, theStreamType+"EventContent")
634 
635 
636  addAlCaSelects=False
637  if theStreamType=='ALCARECO' and not theFilterName:
638  theFilterName='StreamALCACombined'
639  addAlCaSelects=True
640 
641  CppType='PoolOutputModule'
642  if self._options.timeoutOutput:
643  CppType='TimeoutPoolOutputModule'
644  if theStreamType=='DQM' and theTier=='DQMIO': CppType='DQMRootOutputModule'
645  output = cms.OutputModule(CppType,
646  theEventContent.clone(),
647  fileName = cms.untracked.string(theFileName),
648  dataset = cms.untracked.PSet(
649  dataTier = cms.untracked.string(theTier),
650  filterName = cms.untracked.string(theFilterName))
651  )
652  if not theSelectEvent and hasattr(self.process,'generation_step') and theStreamType!='LHE':
653  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step'))
654  if not theSelectEvent and hasattr(self.process,'filtering_step'):
655  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filtering_step'))
656  if theSelectEvent:
657  output.SelectEvents =cms.untracked.PSet(SelectEvents = cms.vstring(theSelectEvent))
658 
659  if addAlCaSelects:
660  if not hasattr(output,'SelectEvents'):
661  output.SelectEvents=cms.untracked.PSet(SelectEvents=cms.vstring())
662  for alca in self.AlCaPaths:
663  output.SelectEvents.SelectEvents.extend(getattr(self.process,'OutALCARECO'+alca).SelectEvents.SelectEvents)
664 
665 
666  if hasattr(self.process,theModuleLabel):
667  raise Exception("the current process already has a module "+theModuleLabel+" defined")
668  #print "creating output module ",theModuleLabel
669  setattr(self.process,theModuleLabel,output)
670  outputModule=getattr(self.process,theModuleLabel)
671  setattr(self.process,theModuleLabel+'_step',cms.EndPath(outputModule))
672  path=getattr(self.process,theModuleLabel+'_step')
673  self.schedule.append(path)
674 
675  if not self._options.inlineEventContent and hasattr(self.process,theStreamType+"EventContent"):
676  def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+theStreamType+"EventContent.outputCommands)"): return label
677  outputModule.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
678  if theExtraOutputCommands:
679  if not isinstance(theExtraOutputCommands,list):
680  raise Exception("extra ouput command in --option must be a list of strings")
681  if hasattr(self.process,theStreamType+"EventContent"):
682  self.executeAndRemember('process.%s.outputCommands.extend(%s)'%(theModuleLabel,theExtraOutputCommands))
683  else:
684  outputModule.outputCommands.extend(theExtraOutputCommands)
685 
686  result+="\nprocess."+theModuleLabel+" = "+outputModule.dumpPython()
687 
688 
689  return result
690 
691  streamTypes=self._options.eventcontent.split(',')
692  tiers=self._options.datatier.split(',')
693  if not self._options.outputDefinition and len(streamTypes)!=len(tiers):
694  raise Exception("number of event content arguments does not match number of datatier arguments")
695 
696  # if the only step is alca we don't need to put in an output
697  if self._options.step.split(',')[0].split(':')[0] == 'ALCA':
698  return "\n"
699 
700  for i,(streamType,tier) in enumerate(zip(streamTypes,tiers)):
701  if streamType=='': continue
702  if streamType == 'ALCARECO' and not 'ALCAPRODUCER' in self._options.step: continue
703  if streamType=='DQMIO': streamType='DQM'
704  eventContent=streamType
705 
706  if streamType == "NANOEDMAOD" :
707  eventContent = "NANOAOD"
708  elif streamType == "NANOEDMAODSIM" :
709  eventContent = "NANOAODSIM"
710  theEventContent = getattr(self.process, eventContent+"EventContent")
711  if i==0:
712  theFileName=self._options.outfile_name
713  theFilterName=self._options.filtername
714  else:
715  theFileName=self._options.outfile_name.replace('.root','_in'+streamType+'.root')
716  theFilterName=self._options.filtername
717  CppType='PoolOutputModule'
718  if self._options.timeoutOutput:
719  CppType='TimeoutPoolOutputModule'
720  if streamType=='DQM' and tier=='DQMIO': CppType='DQMRootOutputModule'
721  if "NANOAOD" in streamType : CppType='NanoAODOutputModule'
722  output = cms.OutputModule(CppType,
723  theEventContent,
724  fileName = cms.untracked.string(theFileName),
725  dataset = cms.untracked.PSet(dataTier = cms.untracked.string(tier),
726  filterName = cms.untracked.string(theFilterName)
727  )
728  )
729  if hasattr(self.process,"generation_step") and streamType!='LHE':
730  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step'))
731  if hasattr(self.process,"filtering_step"):
732  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filtering_step'))
733 
734  if streamType=='ALCARECO':
735  output.dataset.filterName = cms.untracked.string('StreamALCACombined')
736 
737  if "MINIAOD" in streamType:
738  from PhysicsTools.PatAlgos.slimming.miniAOD_tools import miniAOD_customizeOutput
740 
741  outputModuleName=streamType+'output'
742  setattr(self.process,outputModuleName,output)
743  outputModule=getattr(self.process,outputModuleName)
744  setattr(self.process,outputModuleName+'_step',cms.EndPath(outputModule))
745  path=getattr(self.process,outputModuleName+'_step')
746  self.schedule.append(path)
747 
748  if self._options.outputCommands and streamType!='DQM':
749  for evct in self._options.outputCommands.split(','):
750  if not evct: continue
751  self.executeAndRemember("process.%s.outputCommands.append('%s')"%(outputModuleName,evct.strip()))
752 
753  if not self._options.inlineEventContent:
754  tmpstreamType=streamType
755  if "NANOEDM" in tmpstreamType :
756  tmpstreamType=tmpstreamType.replace("NANOEDM","NANO")
757  def doNotInlineEventContent(instance,label = "process."+tmpstreamType+"EventContent.outputCommands"):
758  return label
759  outputModule.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
760 
761  result+="\nprocess."+outputModuleName+" = "+outputModule.dumpPython()
762 
763  return result
764 
765 
def replace(string, replacements)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def anyOf(listOfKeys, dict, opt=None)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def addOutput(process)
Definition: FastTimer.py:47
def miniAOD_customizeOutput(out)

◆ addSource()

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

Definition at line 432 of file ConfigBuilder.py.

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().

432  def addSource(self):
433  """Here the source is built. Priority: file, generator"""
434  self.addedObjects.append(("Input source","source"))
435 
436  def filesFromOption(self):
437  for entry in self._options.filein.split(','):
438  print("entry",entry)
439  if entry.startswith("filelist:"):
440  filesFromList(entry[9:],self.process.source)
441  elif entry.startswith("dbs:") or entry.startswith("das:"):
442  filesFromDASQuery('file dataset = %s'%(entry[4:]),self._options.dasoption,self.process.source)
443  else:
444  self.process.source.fileNames.append(self._options.dirin+entry)
445  if self._options.secondfilein:
446  if not hasattr(self.process.source,"secondaryFileNames"):
447  raise Exception("--secondfilein not compatible with "+self._options.filetype+"input type")
448  for entry in self._options.secondfilein.split(','):
449  print("entry",entry)
450  if entry.startswith("filelist:"):
451  self.process.source.secondaryFileNames.extend((filesFromList(entry[9:]))[0])
452  elif entry.startswith("dbs:") or entry.startswith("das:"):
453  self.process.source.secondaryFileNames.extend((filesFromDASQuery('file dataset = %s'%(entry[4:]),self._options.dasoption))[0])
454  else:
455  self.process.source.secondaryFileNames.append(self._options.dirin+entry)
456 
457  if self._options.filein or self._options.dasquery:
458  if self._options.filetype == "EDM":
459  self.process.source=cms.Source("PoolSource",
460  fileNames = cms.untracked.vstring(),
461  secondaryFileNames= cms.untracked.vstring())
462  filesFromOption(self)
463  elif self._options.filetype == "DAT":
464  self.process.source=cms.Source("NewEventStreamFileReader",fileNames = cms.untracked.vstring())
465  filesFromOption(self)
466  elif self._options.filetype == "LHE":
467  self.process.source=cms.Source("LHESource", fileNames = cms.untracked.vstring())
468  if self._options.filein.startswith("lhe:"):
469  #list the article directory automatically
470  args=self._options.filein.split(':')
471  article=args[1]
472  print('LHE input from article ',article)
473  location='/store/lhe/'
474  import os
475  textOfFiles=os.popen('cmsLHEtoEOSManager.py -l '+article)
476  for line in textOfFiles:
477  for fileName in [x for x in line.split() if '.lhe' in x]:
478  self.process.source.fileNames.append(location+article+'/'+fileName)
479  #check first if list of LHE files is loaded (not empty)
480  if len(line)<2:
481  print('Issue to load LHE files, please check and try again.')
482  sys.exit(-1)
483  #Additional check to protect empty fileNames in process.source
484  if len(self.process.source.fileNames)==0:
485  print('Issue with empty filename, but can pass line check')
486  sys.exit(-1)
487  if len(args)>2:
488  self.process.source.skipEvents = cms.untracked.uint32(int(args[2]))
489  else:
490  filesFromOption(self)
491 
492  elif self._options.filetype == "DQM":
493  self.process.source=cms.Source("DQMRootSource",
494  fileNames = cms.untracked.vstring())
495  filesFromOption(self)
496 
497  elif self._options.filetype == "DQMDAQ":
498  # FIXME: how to configure it if there are no input files specified?
499  self.process.source=cms.Source("DQMStreamerReader")
500 
501 
502  if ('HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys()) and (not self._options.filetype == "DQM"):
503  self.process.source.processingMode = cms.untracked.string("RunsAndLumis")
504 
505  if self._options.dasquery!='':
506  self.process.source=cms.Source("PoolSource", fileNames = cms.untracked.vstring(),secondaryFileNames = cms.untracked.vstring())
507  filesFromDASQuery(self._options.dasquery,self._options.dasoption,self.process.source)
508 
509  if ('HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys()) and (not self._options.filetype == "DQM"):
510  self.process.source.processingMode = cms.untracked.string("RunsAndLumis")
511 
512 
513  if 'GEN' in self.stepMap.keys() and not self._options.filetype == "LHE":
514  if self._options.inputCommands:
515  self._options.inputCommands+=',drop LHEXMLStringProduct_*_*_*,'
516  else:
517  self._options.inputCommands='keep *, drop LHEXMLStringProduct_*_*_*,'
518 
519  if self.process.source and self._options.inputCommands and not self._options.filetype == "LHE":
520  if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring()
521  for command in self._options.inputCommands.split(','):
522  # remove whitespace around the keep/drop statements
523  command = command.strip()
524  if command=='': continue
525  self.process.source.inputCommands.append(command)
526  if not self._options.dropDescendant:
527  self.process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool(False)
528 
529  if self._options.lumiToProcess:
530  import FWCore.PythonUtilities.LumiList as LumiList
531  self.process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange( LumiList.LumiList(self._options.lumiToProcess).getCMSSWString().split(',') )
532 
533  if 'GEN' in self.stepMap.keys() or 'LHE' in self.stepMap or (not self._options.filein and hasattr(self._options, "evt_type")):
534  if self.process.source is None:
535  self.process.source=cms.Source("EmptySource")
536 
537  # modify source in case of run-dependent MC
538  self.runsAndWeights=None
539  if self._options.runsAndWeightsForMC or self._options.runsScenarioForMC :
540  if not self._options.isMC :
541  raise Exception("options --runsAndWeightsForMC and --runsScenarioForMC are only valid for MC")
542  if self._options.runsAndWeightsForMC:
543  self.runsAndWeights = eval(self._options.runsAndWeightsForMC)
544  else:
545  from Configuration.StandardSequences.RunsAndWeights import RunsAndWeights
546  if isinstance(RunsAndWeights[self._options.runsScenarioForMC], str):
547  __import__(RunsAndWeights[self._options.runsScenarioForMC])
548  self.runsAndWeights = sys.modules[RunsAndWeights[self._options.runsScenarioForMC]].runProbabilityDistribution
549  else:
550  self.runsAndWeights = RunsAndWeights[self._options.runsScenarioForMC]
551 
552  if self.runsAndWeights:
553  import SimGeneral.Configuration.ThrowAndSetRandomRun as ThrowAndSetRandomRun
554  ThrowAndSetRandomRun.throwAndSetRandomRun(self.process.source,self.runsAndWeights)
555  self.additionalCommands.append('import SimGeneral.Configuration.ThrowAndSetRandomRun as ThrowAndSetRandomRun')
556  self.additionalCommands.append('ThrowAndSetRandomRun.throwAndSetRandomRun(process.source,%s)'%(self.runsAndWeights))
557 
558  # modify source in case of run-dependent MC (Run-3 method)
559  self.runsAndWeightsInt=None
560  if self._options.runsAndWeightsForMCIntegerWeights or self._options.runsScenarioForMCIntegerWeights:
561  if not self._options.isMC :
562  raise Exception("options --runsAndWeightsForMCIntegerWeights and --runsScenarioForMCIntegerWeights are only valid for MC")
563  if self._options.runsAndWeightsForMCIntegerWeights:
564  self.runsAndWeightsInt = eval(self._options.runsAndWeightsForMCIntegerWeights)
565  else:
566  from Configuration.StandardSequences.RunsAndWeights import RunsAndWeights
567  if isinstance(RunsAndWeights[self._options.runsScenarioForMCIntegerWeights], str):
568  __import__(RunsAndWeights[self._options.runsScenarioForMCIntegerWeights])
569  self.runsAndWeightsInt = sys.modules[RunsAndWeights[self._options.runsScenarioForMCIntegerWeights]].runProbabilityDistribution
570  else:
571  self.runsAndWeightsInt = RunsAndWeights[self._options.runsScenarioForMCIntegerWeights]
572 
573  if self.runsAndWeightsInt:
574  if not self._options.relval:
575  raise Exception("--relval option required when using --runsAndWeightsInt")
576  if 'DATAMIX' in self._options.step:
577  from SimGeneral.Configuration.LumiToRun import lumi_to_run
578  total_events, events_per_job = self._options.relval.split(',')
579  lumi_to_run_mapping = lumi_to_run(self.runsAndWeightsInt, int(total_events), int(events_per_job))
580  self.additionalCommands.append("process.source.firstLuminosityBlockForEachRun = cms.untracked.VLuminosityBlockID(*[cms.LuminosityBlockID(x,y) for x,y in " + str(lumi_to_run_mapping) + "])")
581 
582  return
583 
def filesFromDASQuery(query, option="", s=None)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def throwAndSetRandomRun(source, runsAndProbs)
def lumi_to_run(runs, events_in_sample, events_per_job)
Definition: LumiToRun.py:1
#define str(s)
def filesFromList(fileName, s=None)

◆ addStandardSequences()

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

Definition at line 766 of file ConfigBuilder.py.

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().

766  def addStandardSequences(self):
767  """
768  Add selected standard sequences to the process
769  """
770  # load the pile up file
771  if self._options.pileup:
772  pileupSpec=self._options.pileup.split(',')[0]
773 
774  # Does the requested pile-up scenario exist?
775  from Configuration.StandardSequences.Mixing import Mixing,defineMixing
776  if not pileupSpec in Mixing and '.' not in pileupSpec and 'file:' not in pileupSpec:
777  message = pileupSpec+' is not a know mixing scenario:\n available are: '+'\n'.join(Mixing.keys())
778  raise Exception(message)
779 
780  # Put mixing parameters in a dictionary
781  if '.' in pileupSpec:
782  mixingDict={'file':pileupSpec}
783  elif pileupSpec.startswith('file:'):
784  mixingDict={'file':pileupSpec[5:]}
785  else:
786  import copy
787  mixingDict=copy.copy(Mixing[pileupSpec])
788  if len(self._options.pileup.split(','))>1:
789  mixingDict.update(eval(self._options.pileup[self._options.pileup.find(',')+1:]))
790 
791  # Load the pu cfg file corresponding to the requested pu scenario
792  if 'file:' in pileupSpec:
793  #the file is local
794  self.process.load(mixingDict['file'])
795  print("inlining mixing module configuration")
796  self._options.inlineObjects+=',mix'
797  else:
798  self.loadAndRemember(mixingDict['file'])
799 
800  mixingDict.pop('file')
801  if not "DATAMIX" in self.stepMap.keys(): # when DATAMIX is present, pileup_input refers to pre-mixed GEN-RAW
802  if self._options.pileup_input:
803  if self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:'):
804  mixingDict['F']=filesFromDASQuery('file dataset = %s'%(self._options.pileup_input[4:],),self._options.pileup_dasoption)[0]
805  elif self._options.pileup_input.startswith("filelist:"):
806  mixingDict['F']=(filesFromList(self._options.pileup_input[9:]))[0]
807  else:
808  mixingDict['F']=self._options.pileup_input.split(',')
809  specialization=defineMixing(mixingDict)
810  for command in specialization:
811  self.executeAndRemember(command)
812  if len(mixingDict)!=0:
813  raise Exception('unused mixing specification: '+mixingDict.keys().__str__())
814 
815 
816  # load the geometry file
817  try:
818  if len(self.stepMap):
819  self.loadAndRemember(self.GeometryCFF)
820  if ('SIM' in self.stepMap or 'reSIM' in self.stepMap) and not self._options.fast:
821  self.loadAndRemember(self.SimGeometryCFF)
822  if self.geometryDBLabel:
823  self.executeAndRemember('if hasattr(process, "XMLFromDBSource"): process.XMLFromDBSource.label="%s"'%(self.geometryDBLabel))
824  self.executeAndRemember('if hasattr(process, "DDDetectorESProducerFromDB"): process.DDDetectorESProducerFromDB.label="%s"'%(self.geometryDBLabel))
825 
826  except ImportError:
827  print("Geometry option",self._options.geometry,"unknown.")
828  raise
829 
830  if len(self.stepMap):
831  self.loadAndRemember(self.magFieldCFF)
832 
833  for stepName in self.stepKeys:
834  stepSpec = self.stepMap[stepName]
835  print("Step:", stepName,"Spec:",stepSpec)
836  if stepName.startswith('re'):
837 
838  if stepName[2:] not in self._options.donotDropOnInput:
839  self._options.inputEventContent='%s,%s'%(stepName.upper(),self._options.inputEventContent)
840  stepName=stepName[2:]
841  if stepSpec=="":
842  getattr(self,"prepare_"+stepName)(stepSpec = getattr(self,stepName+"DefaultSeq"))
843  elif isinstance(stepSpec, list):
844  getattr(self,"prepare_"+stepName)(stepSpec = '+'.join(stepSpec))
845  elif isinstance(stepSpec, tuple):
846  getattr(self,"prepare_"+stepName)(stepSpec = ','.join([stepSpec[1],'+'.join(stepSpec[0])]))
847  else:
848  raise ValueError("Invalid step definition")
849 
850  if self._options.restoreRNDSeeds!=False:
851  #it is either True, or a process name
852  if self._options.restoreRNDSeeds==True:
853  self.executeAndRemember('process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")')
854  else:
855  self.executeAndRemember('process.RandomNumberGeneratorService.restoreStateTag=cms.untracked.InputTag("randomEngineStateProducer","","%s")'%(self._options.restoreRNDSeeds))
856  if self._options.inputEventContent or self._options.inputCommands:
857  if self._options.inputCommands:
858  self._options.inputCommands+='keep *_randomEngineStateProducer_*_*,'
859  else:
860  self._options.inputCommands='keep *_randomEngineStateProducer_*_*,'
861 
862 
def filesFromDASQuery(query, option="", s=None)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def load(fileName)
Definition: svgfig.py:547
def defineMixing(dict)
Definition: Mixing.py:207
def filesFromList(fileName, s=None)

◆ build_production_info()

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

Definition at line 2193 of file ConfigBuilder.py.

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().

2193  def build_production_info(self, evt_type, evtnumber):
2194  """ Add useful info for the production. """
2195  self.process.configurationMetadata=cms.untracked.PSet\
2196  (version=cms.untracked.string("$Revision: 1.19 $"),
2197  name=cms.untracked.string("Applications"),
2198  annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber))
2199  )
2200 
2201  self.addedObjects.append(("Production Info","configurationMetadata"))
2202 
2203 
#define str(s)

◆ completeInputCommand()

def ConfigBuilder.ConfigBuilder.completeInputCommand (   self)

Definition at line 863 of file ConfigBuilder.py.

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().

863  def completeInputCommand(self):
864  if self._options.inputEventContent:
865  import copy
866  def dropSecondDropStar(iec):
867  #drop occurence of 'drop *' in the list
868  count=0
869  for item in iec:
870  if item=='drop *':
871  if count!=0:
872  iec.remove(item)
873  count+=1
874 
875 
876  if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring()
877  for evct in self._options.inputEventContent.split(','):
878  if evct=='': continue
879  theEventContent = getattr(self.process, evct+"EventContent")
880  if hasattr(theEventContent,'outputCommands'):
881  self.process.source.inputCommands.extend(copy.copy(theEventContent.outputCommands))
882  if hasattr(theEventContent,'inputCommands'):
883  self.process.source.inputCommands.extend(copy.copy(theEventContent.inputCommands))
884 
885  dropSecondDropStar(self.process.source.inputCommands)
886 
887  if not self._options.dropDescendant:
888  self.process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool(False)
889 
890 
891  return
892 

◆ create_process()

def ConfigBuilder.ConfigBuilder.create_process (   self)

Definition at line 2204 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.pythonCfgCode.

Referenced by ConfigBuilder.ConfigBuilder.build_production_info().

2204  def create_process(self):
2205  self.pythonCfgCode = "# Auto generated configuration file\n"
2206  self.pythonCfgCode += "# using: \n# "+__version__[1:-1]+"\n# "+__source__[1:-1]+'\n'
2207  self.pythonCfgCode += "# with command line options: "+self._options.arguments+'\n'
2208  self.pythonCfgCode += "import FWCore.ParameterSet.Config as cms\n\n"
2209 
2210  # now set up the modifies
2211  modifiers=[]
2212  modifierStrings=[]
2213  modifierImports=[]
2214 
2215  if hasattr(self._options,"era") and self._options.era :
2216  # Multiple eras can be specified in a comma seperated list
2217  from Configuration.StandardSequences.Eras import eras
2218  for requestedEra in self._options.era.split(",") :
2219  modifierStrings.append(requestedEra)
2220  modifierImports.append(eras.pythonCfgLines[requestedEra])
2221  modifiers.append(getattr(eras,requestedEra))
2222 
2223 
2224  if hasattr(self._options,"procModifiers") and self._options.procModifiers:
2225  import importlib
2226  thingsImported=[]
2227  for c in self._options.procModifiers:
2228  thingsImported.extend(c.split(","))
2229  for pm in thingsImported:
2230  modifierStrings.append(pm)
2231  modifierImports.append('from Configuration.ProcessModifiers.'+pm+'_cff import '+pm)
2232  modifiers.append(getattr(importlib.import_module('Configuration.ProcessModifiers.'+pm+'_cff'),pm))
2233 
2234  self.pythonCfgCode += '\n'.join(modifierImports)+'\n\n'
2235  self.pythonCfgCode += "process = cms.Process('"+self._options.name+"'" # Start of the line, finished after the loop
2236 
2237 
2238  if len(modifierStrings)>0:
2239  self.pythonCfgCode+= ','+','.join(modifierStrings)
2240  self.pythonCfgCode+=')\n\n'
2241 
2242  #yes, the cfg code gets out of sync here if a process is passed in. That could be fixed in the future
2243  #assuming there is some way for the fwk to get the list of modifiers (and their stringified name)
2244  if self.process == None:
2245  if len(modifiers)>0:
2246  self.process = cms.Process(self._options.name,*modifiers)
2247  else:
2248  self.process = cms.Process(self._options.name)
2249 
2250 
2251 
2252 
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ define_Configs()

def ConfigBuilder.ConfigBuilder.define_Configs (   self)

Definition at line 996 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.addCustomiseCmdLine().

996  def define_Configs(self):
997  if len(self.stepMap):
998  self.loadAndRemember('Configuration/StandardSequences/Services_cff')
999  if self._options.particleTable not in defaultOptions.particleTableList:
1000  print('Invalid particle table provided. Options are:')
1001  print(defaultOptions.particleTable)
1002  sys.exit(-1)
1003  else:
1004  if len(self.stepMap):
1005  self.loadAndRemember('SimGeneral.HepPDTESSource.'+self._options.particleTable+'_cfi')
1006 
1007  self.loadAndRemember('FWCore/MessageService/MessageLogger_cfi')
1008 
1009  self.ALCADefaultCFF="Configuration/StandardSequences/AlCaRecoStreams_cff"
1010  self.GENDefaultCFF="Configuration/StandardSequences/Generator_cff"
1011  self.SIMDefaultCFF="Configuration/StandardSequences/Sim_cff"
1012  self.DIGIDefaultCFF="Configuration/StandardSequences/Digi_cff"
1013  self.DIGI2RAWDefaultCFF="Configuration/StandardSequences/DigiToRaw_cff"
1014  self.L1EMDefaultCFF='Configuration/StandardSequences/SimL1Emulator_cff'
1015  self.L1MENUDefaultCFF="Configuration/StandardSequences/L1TriggerDefaultMenu_cff"
1016  self.HLTDefaultCFF="Configuration/StandardSequences/HLTtable_cff"
1017  self.RAW2DIGIDefaultCFF="Configuration/StandardSequences/RawToDigi_Data_cff"
1018  if self._options.isRepacked: self.RAW2DIGIDefaultCFF="Configuration/StandardSequences/RawToDigi_DataMapper_cff"
1019  self.L1RecoDefaultCFF="Configuration/StandardSequences/L1Reco_cff"
1020  self.L1TrackTriggerDefaultCFF="Configuration/StandardSequences/L1TrackTrigger_cff"
1021  self.RECODefaultCFF="Configuration/StandardSequences/Reconstruction_Data_cff"
1022  self.RECOSIMDefaultCFF="Configuration/StandardSequences/RecoSim_cff"
1023  self.PATDefaultCFF="Configuration/StandardSequences/PAT_cff"
1024  self.NANODefaultCFF="PhysicsTools/NanoAOD/nano_cff"
1025  self.NANOGENDefaultCFF="PhysicsTools/NanoAOD/nanogen_cff"
1026  self.SKIMDefaultCFF="Configuration/StandardSequences/Skims_cff"
1027  self.POSTRECODefaultCFF="Configuration/StandardSequences/PostRecoGenerator_cff"
1028  self.VALIDATIONDefaultCFF="Configuration/StandardSequences/Validation_cff"
1029  self.L1HwValDefaultCFF = "Configuration/StandardSequences/L1HwVal_cff"
1030  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOffline_cff"
1031  self.HARVESTINGDefaultCFF="Configuration/StandardSequences/Harvesting_cff"
1032  self.ALCAHARVESTDefaultCFF="Configuration/StandardSequences/AlCaHarvesting_cff"
1033  self.ENDJOBDefaultCFF="Configuration/StandardSequences/EndOfProcess_cff"
1034  self.ConditionsDefaultCFF = "Configuration/StandardSequences/FrontierConditions_GlobalTag_cff"
1035  self.CFWRITERDefaultCFF = "Configuration/StandardSequences/CrossingFrameWriter_cff"
1036  self.REPACKDefaultCFF="Configuration/StandardSequences/DigiToRaw_Repack_cff"
1037 
1038  if "DATAMIX" in self.stepMap.keys():
1039  self.DATAMIXDefaultCFF="Configuration/StandardSequences/DataMixer"+self._options.datamix+"_cff"
1040  self.DIGIDefaultCFF="Configuration/StandardSequences/DigiDM_cff"
1041  self.DIGI2RAWDefaultCFF="Configuration/StandardSequences/DigiToRawDM_cff"
1042  self.L1EMDefaultCFF='Configuration/StandardSequences/SimL1EmulatorDM_cff'
1043 
1044  self.ALCADefaultSeq=None
1045  self.LHEDefaultSeq='externalLHEProducer'
1046  self.GENDefaultSeq='pgen'
1047  self.SIMDefaultSeq='psim'
1048  self.DIGIDefaultSeq='pdigi'
1049  self.DATAMIXDefaultSeq=None
1050  self.DIGI2RAWDefaultSeq='DigiToRaw'
1051  self.HLTDefaultSeq='GRun'
1052  self.L1DefaultSeq=None
1053  self.L1REPACKDefaultSeq='GT'
1054  self.HARVESTINGDefaultSeq=None
1055  self.ALCAHARVESTDefaultSeq=None
1056  self.CFWRITERDefaultSeq=None
1057  self.RAW2DIGIDefaultSeq='RawToDigi'
1058  self.L1RecoDefaultSeq='L1Reco'
1059  self.L1TrackTriggerDefaultSeq='L1TrackTrigger'
1060  if self._options.fast or ('RAW2DIGI' in self.stepMap and 'RECO' in self.stepMap):
1061  self.RECODefaultSeq='reconstruction'
1062  else:
1063  self.RECODefaultSeq='reconstruction_fromRECO'
1064  self.RECOSIMDefaultSeq='recosim'
1065  self.POSTRECODefaultSeq=None
1066  self.L1HwValDefaultSeq='L1HwVal'
1067  self.DQMDefaultSeq='DQMOffline'
1068  self.VALIDATIONDefaultSeq=''
1069  self.ENDJOBDefaultSeq='endOfProcess'
1070  self.REPACKDefaultSeq='DigiToRawRepack'
1071  self.PATDefaultSeq='miniAOD'
1072  self.PATGENDefaultSeq='miniGEN'
1073  #TODO: Check based of file input
1074  self.NANOGENDefaultSeq='nanogenSequence'
1075  self.NANODefaultSeq='nanoSequence'
1076  self.NANODefaultCustom='nanoAOD_customizeCommon'
1077 
1078  self.EVTCONTDefaultCFF="Configuration/EventContent/EventContent_cff"
1079 
1080  if not self._options.beamspot:
1081  self._options.beamspot=VtxSmearedDefaultKey
1082 
1083  # if its MC then change the raw2digi
1084  if self._options.isMC==True:
1085  self.RAW2DIGIDefaultCFF="Configuration/StandardSequences/RawToDigi_cff"
1086  self.RECODefaultCFF="Configuration/StandardSequences/Reconstruction_cff"
1087  self.PATDefaultCFF="Configuration/StandardSequences/PATMC_cff"
1088  self.PATGENDefaultCFF="Configuration/StandardSequences/PATGEN_cff"
1089  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineMC_cff"
1090  self.ALCADefaultCFF="Configuration/StandardSequences/AlCaRecoStreamsMC_cff"
1091  self.NANODefaultSeq='nanoSequenceMC'
1092  else:
1093  self._options.beamspot = None
1094 
1095  #patch for gen, due to backward incompatibility
1096  if 'reGEN' in self.stepMap:
1097  self.GENDefaultSeq='fixGenInfo'
1098 
1099  if self._options.scenario=='cosmics':
1100  self._options.pileup='Cosmics'
1101  self.DIGIDefaultCFF="Configuration/StandardSequences/DigiCosmics_cff"
1102  self.RECODefaultCFF="Configuration/StandardSequences/ReconstructionCosmics_cff"
1103  self.SKIMDefaultCFF="Configuration/StandardSequences/SkimsCosmics_cff"
1104  self.EVTCONTDefaultCFF="Configuration/EventContent/EventContentCosmics_cff"
1105  self.VALIDATIONDefaultCFF="Configuration/StandardSequences/ValidationCosmics_cff"
1106  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineCosmics_cff"
1107  if self._options.isMC==True:
1108  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineCosmicsMC_cff"
1109  self.HARVESTINGDefaultCFF="Configuration/StandardSequences/HarvestingCosmics_cff"
1110  self.RECODefaultSeq='reconstructionCosmics'
1111  self.DQMDefaultSeq='DQMOfflineCosmics'
1112 
1113  if self._options.scenario=='HeavyIons':
1114  if not self._options.beamspot:
1115  self._options.beamspot=VtxSmearedHIDefaultKey
1116  self.HLTDefaultSeq = 'HIon'
1117  self.VALIDATIONDefaultCFF="Configuration/StandardSequences/ValidationHeavyIons_cff"
1118  self.VALIDATIONDefaultSeq=''
1119  self.EVTCONTDefaultCFF="Configuration/EventContent/EventContentHeavyIons_cff"
1120  self.RECODefaultCFF="Configuration/StandardSequences/ReconstructionHeavyIons_cff"
1121  self.RECODefaultSeq='reconstructionHeavyIons'
1122  self.ALCADefaultCFF = "Configuration/StandardSequences/AlCaRecoStreamsHeavyIons_cff"
1123  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineHeavyIons_cff"
1124  self.DQMDefaultSeq='DQMOfflineHeavyIons'
1125  self.SKIMDefaultCFF="Configuration/StandardSequences/SkimsHeavyIons_cff"
1126  self.HARVESTINGDefaultCFF="Configuration/StandardSequences/HarvestingHeavyIons_cff"
1127  if self._options.isMC==True:
1128  self.DQMOFFLINEDefaultCFF="DQMOffline/Configuration/DQMOfflineHeavyIonsMC_cff"
1129 
1130 
1131  self.RAW2RECODefaultSeq=','.join([self.RAW2DIGIDefaultSeq,self.RECODefaultSeq])
1132 
1133  self.USERDefaultSeq='user'
1134  self.USERDefaultCFF=None
1135 
1136  # the magnetic field
1137  self.magFieldCFF = 'Configuration/StandardSequences/MagneticField_'+self._options.magField.replace('.','')+'_cff'
1138  self.magFieldCFF = self.magFieldCFF.replace("__",'_')
1139 
1140  # the geometry
1141  self.GeometryCFF='Configuration/StandardSequences/GeometryRecoDB_cff'
1142  self.geometryDBLabel=None
1143  simGeometry=''
1144  if self._options.fast:
1145  if 'start' in self._options.conditions.lower():
1146  self.GeometryCFF='FastSimulation/Configuration/Geometries_START_cff'
1147  else:
1148  self.GeometryCFF='FastSimulation/Configuration/Geometries_MC_cff'
1149  else:
1150  def inGeometryKeys(opt):
1151  from Configuration.StandardSequences.GeometryConf import GeometryConf
1152  if opt in GeometryConf:
1153  return GeometryConf[opt]
1154  else:
1155  return opt
1156 
1157  geoms=self._options.geometry.split(',')
1158  if len(geoms)==1: geoms=inGeometryKeys(geoms[0]).split(',')
1159  if len(geoms)==2:
1160  #may specify the reco geometry
1161  if '/' in geoms[1] or '_cff' in geoms[1]:
1162  self.GeometryCFF=geoms[1]
1163  else:
1164  self.GeometryCFF='Configuration/Geometry/Geometry'+geoms[1]+'_cff'
1165 
1166  if (geoms[0].startswith('DB:')):
1167  self.SimGeometryCFF='Configuration/StandardSequences/GeometrySimDB_cff'
1168  self.geometryDBLabel=geoms[0][3:]
1169  print("with DB:")
1170  else:
1171  if '/' in geoms[0] or '_cff' in geoms[0]:
1172  self.SimGeometryCFF=geoms[0]
1173  else:
1174  simGeometry=geoms[0]
1175  if self._options.gflash==True:
1176  self.SimGeometryCFF='Configuration/Geometry/Geometry'+geoms[0]+'GFlash_cff'
1177  else:
1178  self.SimGeometryCFF='Configuration/Geometry/Geometry'+geoms[0]+'_cff'
1179 
1180  # synchronize the geometry configuration and the FullSimulation sequence to be used
1181  if simGeometry not in defaultOptions.geometryExtendedOptions:
1182  self.SIMDefaultCFF="Configuration/StandardSequences/SimIdeal_cff"
1183 
1184  if self._options.scenario=='nocoll' or self._options.scenario=='cosmics':
1185  self.SIMDefaultCFF="Configuration/StandardSequences/SimNOBEAM_cff"
1186  self._options.beamspot='NoSmear'
1187 
1188  # fastsim requires some changes to the default cff files and sequences
1189  if self._options.fast:
1190  self.SIMDefaultCFF = 'FastSimulation.Configuration.SimIdeal_cff'
1191  self.RECODefaultCFF= 'FastSimulation.Configuration.Reconstruction_AftMix_cff'
1192  self.RECOBEFMIXDefaultCFF = 'FastSimulation.Configuration.Reconstruction_BefMix_cff'
1193  self.RECOBEFMIXDefaultSeq = 'reconstruction_befmix'
1194  self.NANODefaultSeq = 'nanoSequenceFS'
1195  self.DQMOFFLINEDefaultCFF="DQMOffline.Configuration.DQMOfflineFS_cff"
1196 
1197  # Mixing
1198  if self._options.pileup=='default':
1199  from Configuration.StandardSequences.Mixing import MixingDefaultKey
1200  self._options.pileup=MixingDefaultKey
1201 
1202 
1203  #not driven by a default cff anymore
1204  if self._options.isData:
1205  self._options.pileup=None
1206 
1207 
1208  self.REDIGIDefaultSeq=self.DIGIDefaultSeq
1209 
def replace(string, replacements)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ executeAndRemember()

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

Definition at line 379 of file ConfigBuilder.py.

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().

379  def executeAndRemember(self, command):
380  """helper routine to remember replace statements"""
381  self.additionalCommands.append(command)
382  if not command.strip().startswith("#"):
383  # substitute: process.foo = process.bar -> self.process.foo = self.process.bar
384  import re
385  exec(re.sub(r"([^a-zA-Z_0-9]|^)(process)([^a-zA-Z_0-9])",r"\1self.process\3",command))
386  #exec(command.replace("process.","self.process."))
387 

◆ expandMapping()

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

Definition at line 2045 of file ConfigBuilder.py.

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().

2045  def expandMapping(self,seqList,mapping,index=None):
2046  maxLevel=30
2047  level=0
2048  while '@' in repr(seqList) and level<maxLevel:
2049  level+=1
2050  for specifiedCommand in seqList:
2051  if specifiedCommand.startswith('@'):
2052  location=specifiedCommand[1:]
2053  if not location in mapping:
2054  raise Exception("Impossible to map "+location+" from "+repr(mapping))
2055  mappedTo=mapping[location]
2056  if index!=None:
2057  mappedTo=mappedTo[index]
2058  seqList.remove(specifiedCommand)
2059  seqList.extend(mappedTo.split('+'))
2060  break;
2061  if level==maxLevel:
2062  raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
2063 

◆ finalizeFastSimHLT()

def ConfigBuilder.ConfigBuilder.finalizeFastSimHLT (   self)

Definition at line 2188 of file ConfigBuilder.py.

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().

2188  def finalizeFastSimHLT(self):
2189  self.process.reconstruction = cms.Path(self.process.reconstructionWithFamos)
2190  self.schedule.append(self.process.reconstruction)
2191 
2192 

◆ heapProfileOptions()

def ConfigBuilder.ConfigBuilder.heapProfileOptions (   self)
addJeProfService
Function to add the jemalloc heap  profile service so that you can dump in the middle
of the run.

Definition at line 321 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder._options, alcaDQMUpload.encode(), createfilelist.int, and str.

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

321  def heapProfileOptions(self):
322  """
323  addJeProfService
324  Function to add the jemalloc heap profile service so that you can dump in the middle
325  of the run.
326  """
327  profileOpts = self._options.profile.split(':')
328  profilerStart = 1
329  profilerInterval = 100
330  profilerFormat = None
331  profilerJobFormat = None
332 
333  if len(profileOpts):
334  #type, given as first argument is unused here
335  profileOpts.pop(0)
336  if len(profileOpts):
337  startEvent = profileOpts.pop(0)
338  if not startEvent.isdigit():
339  raise Exception("%s is not a number" % startEvent)
340  profilerStart = int(startEvent)
341  if len(profileOpts):
342  eventInterval = profileOpts.pop(0)
343  if not eventInterval.isdigit():
344  raise Exception("%s is not a number" % eventInterval)
345  profilerInterval = int(eventInterval)
346  if len(profileOpts):
347  profilerFormat = profileOpts.pop(0)
348 
349 
350  if not profilerFormat:
351  profilerFormat = "%s___%s___%%I.heap" % (
352  self._options.evt_type.replace("_cfi", ""),
353  hashlib.md5(
354  (str(self._options.step) + str(self._options.pileup) + str(self._options.conditions) +
355  str(self._options.datatier) + str(self._options.profileTypeLabel)).encode('utf-8')
356  ).hexdigest()
357  )
358  if not profilerJobFormat and profilerFormat.endswith(".heap"):
359  profilerJobFormat = profilerFormat.replace(".heap", "_EndOfJob.heap")
360  elif not profilerJobFormat:
361  profilerJobFormat = profilerFormat + "_EndOfJob.heap"
362 
363  return (profilerStart,profilerInterval,profilerFormat,profilerJobFormat)
364 
def encode(args, files)
#define str(s)

◆ load()

◆ loadAndRemember()

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

Definition at line 370 of file ConfigBuilder.py.

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().

370  def loadAndRemember(self, includeFile):
371  """helper routine to load am memorize imports"""
372  # we could make the imports a on-the-fly data method of the process instance itself
373  # not sure if the latter is a good idea
374  includeFile = includeFile.replace('/','.')
375  self.imports.append(includeFile)
376  self.process.load(includeFile)
377  return sys.modules[includeFile]
378 
def load(fileName)
Definition: svgfig.py:547

◆ loadDefaultOrSpecifiedCFF()

def ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF (   self,
  stepSpec,
  defaultCFF,
  defaultSEQ = '' 
)

Definition at line 1276 of file ConfigBuilder.py.

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_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().

1276  def loadDefaultOrSpecifiedCFF(self, stepSpec, defaultCFF, defaultSEQ=''):
1277  _dotsplit = stepSpec.split('.')
1278  if ( len(_dotsplit)==1 ):
1279  if '/' in _dotsplit[0]:
1280  _sequence = defaultSEQ if defaultSEQ else stepSpec
1281  _cff = _dotsplit[0]
1282  else:
1283  _sequence = stepSpec
1284  _cff = defaultCFF
1285  elif ( len(_dotsplit)==2 ):
1286  _cff,_sequence = _dotsplit
1287  else:
1288  print("sub sequence configuration must be of the form dir/subdir/cff.a+b+c or cff.a")
1289  print(stepSpec,"not recognized")
1290  raise
1291  l=self.loadAndRemember(_cff)
1292  return l,_sequence,_cff
1293 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ prepare()

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

Definition at line 2253 of file ConfigBuilder.py.

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(), mps_monitormerge.items, join(), relativeConstraints.keys, ConfigBuilder.ConfigBuilder.labelsToAssociate, ConfigBuilder.ConfigBuilder.load(), 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.scheduleIndexOfFirstHLTPath, ConfigBuilder.ConfigBuilder.stepMap, str, ConfigBuilder.ConfigBuilder.with_input, and ConfigBuilder.ConfigBuilder.with_output.

2253  def prepare(self, doChecking = False):
2254  """ Prepare the configuration string and add missing pieces."""
2255 
2256  self.loadAndRemember(self.EVTCONTDefaultCFF) #load the event contents regardless
2257  self.addMaxEvents()
2258  if self.with_input:
2259  self.addSource()
2260  self.addStandardSequences()
2261 
2262  self.completeInputCommand()
2263  self.addConditions()
2264 
2265 
2266  outputModuleCfgCode=""
2267  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:
2268  outputModuleCfgCode=self.addOutput()
2269 
2270  self.addCommon()
2271 
2272  self.pythonCfgCode += "# import of standard configurations\n"
2273  for module in self.imports:
2274  self.pythonCfgCode += ("process.load('"+module+"')\n")
2275 
2276  # production info
2277  if not hasattr(self.process,"configurationMetadata"):
2278  self.build_production_info(self._options.evt_type, self._options.number)
2279  else:
2280  #the PSet was added via a load
2281  self.addedObjects.append(("Production Info","configurationMetadata"))
2282 
2283  self.pythonCfgCode +="\n"
2284  for comment,object in self.addedObjects:
2285  if comment!="":
2286  self.pythonCfgCode += "\n# "+comment+"\n"
2287  self.pythonCfgCode += dumpPython(self.process,object)
2288 
2289  # dump the output definition
2290  self.pythonCfgCode += "\n# Output definition\n"
2291  self.pythonCfgCode += outputModuleCfgCode
2292 
2293  # dump all additional outputs (e.g. alca or skim streams)
2294  self.pythonCfgCode += "\n# Additional output definition\n"
2295  #I do not understand why the keys are not normally ordered.
2296  nl=sorted(self.additionalOutputs.keys())
2297  for name in nl:
2298  output = self.additionalOutputs[name]
2299  self.pythonCfgCode += "process.%s = %s" %(name, output.dumpPython())
2300  tmpOut = cms.EndPath(output)
2301  setattr(self.process,name+'OutPath',tmpOut)
2302  self.schedule.append(tmpOut)
2303 
2304  # dump all additional commands
2305  self.pythonCfgCode += "\n# Other statements\n"
2306  for command in self.additionalCommands:
2307  self.pythonCfgCode += command + "\n"
2308 
2309  #comma separated list of objects that deserve to be inlined in the configuration (typically from a modified config deep down)
2310  for object in self._options.inlineObjects.split(','):
2311  if not object:
2312  continue
2313  if not hasattr(self.process,object):
2314  print('cannot inline -'+object+'- : not known')
2315  else:
2316  self.pythonCfgCode +='\n'
2317  self.pythonCfgCode +=dumpPython(self.process,object)
2318 
2319  if self._options.pileup=='HiMixEmbGEN':
2320  self.pythonCfgCode += "\nprocess.generator.embeddingMode=cms.int32(1)\n"
2321 
2322  # dump all paths
2323  self.pythonCfgCode += "\n# Path and EndPath definitions\n"
2324  for path in self.process.paths:
2325  if getattr(self.process,path) not in self.blacklist_paths:
2326  self.pythonCfgCode += dumpPython(self.process,path)
2327 
2328  for endpath in self.process.endpaths:
2329  if getattr(self.process,endpath) not in self.blacklist_paths:
2330  self.pythonCfgCode += dumpPython(self.process,endpath)
2331 
2332  # dump the schedule
2333  self.pythonCfgCode += "\n# Schedule definition\n"
2334 
2335  # handling of the schedule
2336  pathNames = ['process.'+p.label_() for p in self.schedule]
2337  if self.process.schedule == None:
2338  self.process.schedule = cms.Schedule()
2339  for item in self.schedule:
2340  self.process.schedule.append(item)
2341  result = 'process.schedule = cms.Schedule('+','.join(pathNames)+')\n'
2342  else:
2343  if not isinstance(self.scheduleIndexOfFirstHLTPath, int):
2344  raise Exception('the schedule was imported from a cff in HLTrigger.Configuration, but the final index of the first HLT path is undefined')
2345 
2346  for index, item in enumerate(self.schedule):
2347  if index < self.scheduleIndexOfFirstHLTPath:
2348  self.process.schedule.insert(index, item)
2349  else:
2350  self.process.schedule.append(item)
2351 
2352  result = "# process.schedule imported from cff in HLTrigger.Configuration\n"
2353  for index, item in enumerate(pathNames[:self.scheduleIndexOfFirstHLTPath]):
2354  result += 'process.schedule.insert('+str(index)+', '+item+')\n'
2355  if self.scheduleIndexOfFirstHLTPath < len(pathNames):
2356  result += 'process.schedule.extend(['+','.join(pathNames[self.scheduleIndexOfFirstHLTPath:])+'])\n'
2357 
2358  self.pythonCfgCode += result
2359 
2360  for labelToAssociate in self.labelsToAssociate:
2361  self.process.schedule.associate(getattr(self.process, labelToAssociate))
2362  self.pythonCfgCode += 'process.schedule.associate(process.' + labelToAssociate + ')\n'
2363 
2364  from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
2365  associatePatAlgosToolsTask(self.process)
2366  self.pythonCfgCode+="from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask\n"
2367  self.pythonCfgCode+="associatePatAlgosToolsTask(process)\n"
2368 
2369  overrideThreads = (self._options.nThreads != 1)
2370  overrideConcurrentLumis = (self._options.nConcurrentLumis != defaultOptions.nConcurrentLumis)
2371  overrideConcurrentIOVs = (self._options.nConcurrentIOVs != defaultOptions.nConcurrentIOVs)
2372 
2373  if overrideThreads or overrideConcurrentLumis or overrideConcurrentIOVs:
2374  self.pythonCfgCode +="\n"
2375  self.pythonCfgCode +="#Setup FWK for multithreaded\n"
2376  if overrideThreads:
2377  self.pythonCfgCode +="process.options.numberOfThreads = {}\n".format(self._options.nThreads)
2378  self.pythonCfgCode +="process.options.numberOfStreams = {}\n".format(self._options.nStreams)
2379  self.process.options.numberOfThreads = self._options.nThreads
2380  self.process.options.numberOfStreams = self._options.nStreams
2381  if overrideConcurrentLumis:
2382  self.pythonCfgCode +="process.options.numberOfConcurrentLuminosityBlocks = {}\n".format(self._options.nConcurrentLumis)
2383  self.process.options.numberOfConcurrentLuminosityBlocks = self._options.nConcurrentLumis
2384  if overrideConcurrentIOVs:
2385  self.pythonCfgCode +="process.options.eventSetup.numberOfConcurrentIOVs = {}\n".format(self._options.nConcurrentIOVs)
2386  self.process.options.eventSetup.numberOfConcurrentIOVs = self._options.nConcurrentIOVs
2387 
2388  if self._options.accelerators is not None:
2389  accelerators = self._options.accelerators.split(',')
2390  self.pythonCfgCode += "\n"
2391  self.pythonCfgCode += "# Enable only these accelerator backends\n"
2392  self.pythonCfgCode += "process.load('Configuration.StandardSequences.Accelerators_cff')\n"
2393  self.pythonCfgCode += "process.options.accelerators = ['" + "', '".join(accelerators) + "']\n"
2394  self.process.load('Configuration.StandardSequences.Accelerators_cff')
2395  self.process.options.accelerators = accelerators
2396 
2397  #repacked version
2398  if self._options.isRepacked:
2399  self.pythonCfgCode +="\n"
2400  self.pythonCfgCode +="from Configuration.Applications.ConfigBuilder import MassReplaceInputTag\n"
2401  self.pythonCfgCode +="MassReplaceInputTag(process, new=\"rawDataMapperByLabel\", old=\"rawDataCollector\")\n"
2402  MassReplaceInputTag(self.process, new="rawDataMapperByLabel", old="rawDataCollector")
2403 
2404  # special treatment in case of production filter sequence 2/2
2405  if self.productionFilterSequence and not (self._options.pileup=='HiMixEmbGEN'):
2406  self.pythonCfgCode +='# filter all path with the production filter sequence\n'
2407  self.pythonCfgCode +='for path in process.paths:\n'
2408  if len(self.conditionalPaths):
2409  self.pythonCfgCode +='\tif not path in %s: continue\n'%str(self.conditionalPaths)
2410  if len(self.excludedPaths):
2411  self.pythonCfgCode +='\tif path in %s: continue\n'%str(self.excludedPaths)
2412  self.pythonCfgCode +='\tgetattr(process,path).insert(0, process.%s)\n'%(self.productionFilterSequence,)
2413  pfs = getattr(self.process,self.productionFilterSequence)
2414  for path in self.process.paths:
2415  if not path in self.conditionalPaths: continue
2416  if path in self.excludedPaths: continue
2417  getattr(self.process,path).insert(0, pfs)
2418 
2419 
2420  # dump customise fragment
2421  self.pythonCfgCode += self.addCustomise()
2422 
2423  if self._options.runUnscheduled:
2424  print("--runUnscheduled is deprecated and not necessary anymore, and will be removed soon. Please update your command line.")
2425  # Keep the "unscheduled customise functions" separate for now,
2426  # there are customize functions given by users (in our unit
2427  # tests) that need to be run before the "unscheduled customise
2428  # functions"
2429  self.pythonCfgCode += self.addCustomise(1)
2430 
2431  self.pythonCfgCode += self.addCustomiseCmdLine()
2432 
2433  if hasattr(self.process,"logErrorHarvester"):
2434  #configure logErrorHarvester to wait for same EDProducers to finish as the OutputModules
2435  self.pythonCfgCode +="\n#Have logErrorHarvester wait for the same EDProducers to finish as those providing data for the OutputModule\n"
2436  self.pythonCfgCode +="from FWCore.Modules.logErrorHarvester_cff import customiseLogErrorHarvesterUsingOutputCommands\n"
2437  self.pythonCfgCode +="process = customiseLogErrorHarvesterUsingOutputCommands(process)\n"
2438  from FWCore.Modules.logErrorHarvester_cff import customiseLogErrorHarvesterUsingOutputCommands
2439  self.process = customiseLogErrorHarvesterUsingOutputCommands(self.process)
2440 
2441  # Temporary hack to put the early delete customization after
2442  # everything else
2443  #
2444  # FIXME: remove when no longer needed
2445  self.pythonCfgCode += "\n# Add early deletion of temporary data products to reduce peak memory need\n"
2446  self.pythonCfgCode += "from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete\n"
2447  self.pythonCfgCode += "process = customiseEarlyDelete(process)\n"
2448  self.pythonCfgCode += "# End adding early deletion\n"
2449  from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
2450  self.process = customiseEarlyDelete(self.process)
2451 
2452  imports = cms.specialImportRegistry.getSpecialImports()
2453  if len(imports) > 0:
2454  #need to inject this at the top
2455  index = self.pythonCfgCode.find("import FWCore.ParameterSet.Config")
2456  #now find the end of line
2457  index = self.pythonCfgCode.find("\n",index)
2458  self.pythonCfgCode = self.pythonCfgCode[:index]+ "\n" + "\n".join(imports)+"\n" +self.pythonCfgCode[index:]
2459 
2460 
2461  # make the .io file
2462 
2463  if self._options.io:
2464  #io=open(self._options.python_filename.replace('.py','.io'),'w')
2465  if not self._options.io.endswith('.io'): self._option.io+='.io'
2466  io=open(self._options.io,'w')
2467  ioJson={}
2468  if hasattr(self.process.source,"fileNames"):
2469  if len(self.process.source.fileNames.value()):
2470  ioJson['primary']=self.process.source.fileNames.value()
2471  if hasattr(self.process.source,"secondaryFileNames"):
2472  if len(self.process.source.secondaryFileNames.value()):
2473  ioJson['secondary']=self.process.source.secondaryFileNames.value()
2474  if self._options.pileup_input and (self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:')):
2475  ioJson['pileup']=self._options.pileup_input[4:]
2476  for (o,om) in self.process.outputModules_().items():
2477  ioJson[o]=om.fileName.value()
2478  ioJson['GT']=self.process.GlobalTag.globaltag.value()
2479  if self.productionFilterSequence:
2480  ioJson['filter']=self.productionFilterSequence
2481  import json
2482  io.write(json.dumps(ioJson))
2483  return
2484 
2485 
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def load(fileName)
Definition: svgfig.py:547
def dumpPython(process, name)
def associatePatAlgosToolsTask(process)
Definition: helpers.py:24
#define str(s)
def customiseLogErrorHarvesterUsingOutputCommands(process)

◆ prepare_ALCA()

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

Definition at line 1333 of file ConfigBuilder.py.

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

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

1333  def prepare_ALCA(self, stepSpec = None, workflow = 'full'):
1334  """ Enrich the process with alca streams """
1335  alcaConfig,sequence,_=self.loadDefaultOrSpecifiedCFF(stepSpec,self.ALCADefaultCFF)
1336 
1337  MAXLEN=31 #the alca producer name should be shorter than 31 chars as per https://cms-talk.web.cern.ch/t/alcaprompt-datasets-not-loaded-in-dbs/11146/2
1338  # decide which ALCA paths to use
1339  alcaList = sequence.split("+")
1340  for alca in alcaList:
1341  if (len(alca)>MAXLEN):
1342  raise Exception("The following alca "+str(alca)+" name (with length "+str(len(alca))+" chars) cannot be accepted because it exceeds the DBS constraints on the length of the name of the ALCARECOs producers ("+str(MAXLEN)+")!")
1343 
1344  maxLevel=0
1345  from Configuration.AlCa.autoAlca import autoAlca, AlCaNoConcurrentLumis
1346  # support @X from autoAlca.py, and recursion support: i.e T0:@Mu+@EG+...
1347  self.expandMapping(alcaList,autoAlca)
1348  self.AlCaPaths=[]
1349  for name in alcaConfig.__dict__:
1350  alcastream = getattr(alcaConfig,name)
1351  shortName = name.replace('ALCARECOStream','')
1352  if shortName in alcaList and isinstance(alcastream,cms.FilteredStream):
1353  if shortName in AlCaNoConcurrentLumis:
1354  print("Setting numberOfConcurrentLuminosityBlocks=1 because of AlCa sequence {}".format(shortName))
1355  self._options.nConcurrentLumis = 1
1356  self._options.nConcurrentIOVs = 1
1357  output = self.addExtraStream(name,alcastream, workflow = workflow)
1358  self.executeAndRemember('process.ALCARECOEventContent.outputCommands.extend(process.OutALCARECO'+shortName+'_noDrop.outputCommands)')
1359  self.AlCaPaths.append(shortName)
1360  if 'DQM' in alcaList:
1361  if not self._options.inlineEventContent and hasattr(self.process,name):
1362  self.executeAndRemember('process.' + name + '.outputCommands.append("keep *_MEtoEDMConverter_*_*")')
1363  else:
1364  output.outputCommands.append("keep *_MEtoEDMConverter_*_*")
1365 
1366  #rename the HLT process name in the alca modules
1367  if self._options.hltProcess or 'HLT' in self.stepMap:
1368  if isinstance(alcastream.paths,tuple):
1369  for path in alcastream.paths:
1370  self.renameHLTprocessInSequence(path.label())
1371  else:
1372  self.renameHLTprocessInSequence(alcastream.paths.label())
1373 
1374  for i in range(alcaList.count(shortName)):
1375  alcaList.remove(shortName)
1376 
1377  # DQM needs a special handling
1378  elif name == 'pathALCARECODQM' and 'DQM' in alcaList:
1379  path = getattr(alcaConfig,name)
1380  self.schedule.append(path)
1381  alcaList.remove('DQM')
1382 
1383  if isinstance(alcastream,cms.Path):
1384  #black list the alca path so that they do not appear in the cfg
1385  self.blacklist_paths.append(alcastream)
1386 
1387 
1388  if len(alcaList) != 0:
1389  available=[]
1390  for name in alcaConfig.__dict__:
1391  alcastream = getattr(alcaConfig,name)
1392  if isinstance(alcastream,cms.FilteredStream):
1393  available.append(name.replace('ALCARECOStream',''))
1394  print("The following alcas could not be found "+str(alcaList))
1395  print("available ",available)
1396  #print "verify your configuration, ignoring for now"
1397  raise Exception("The following alcas could not be found "+str(alcaList))
1398 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
#define str(s)

◆ prepare_ALCAHARVEST()

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

Definition at line 2148 of file ConfigBuilder.py.

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.

2148  def prepare_ALCAHARVEST(self, stepSpec = None):
2149  """ Enrich the process with AlCaHarvesting step """
2150  harvestingConfig = self.loadAndRemember(self.ALCAHARVESTDefaultCFF)
2151  sequence=stepSpec.split(".")[-1]
2152 
2153  # decide which AlcaHARVESTING paths to use
2154  harvestingList = sequence.split("+")
2155 
2156 
2157 
2158  from Configuration.AlCa.autoPCL import autoPCL
2159  self.expandMapping(harvestingList,autoPCL)
2160 
2161  for name in harvestingConfig.__dict__:
2162  harvestingstream = getattr(harvestingConfig,name)
2163  if name in harvestingList and isinstance(harvestingstream,cms.Path):
2164  self.schedule.append(harvestingstream)
2165  if isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_dbOutput"), cms.VPSet) and \
2166  isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_metadata"), cms.VPSet):
2167  self.executeAndRemember("process.PoolDBOutputService.toPut.extend(process.ALCAHARVEST" + name + "_dbOutput)")
2168  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.extend(process.ALCAHARVEST" + name + "_metadata)")
2169  else:
2170  self.executeAndRemember("process.PoolDBOutputService.toPut.append(process.ALCAHARVEST" + name + "_dbOutput)")
2171  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVEST" + name + "_metadata)")
2172  harvestingList.remove(name)
2173  # append the common part at the end of the sequence
2174  lastStep = getattr(harvestingConfig,"ALCAHARVESTDQMSaveAndMetadataWriter")
2175  self.schedule.append(lastStep)
2176 
2177  if len(harvestingList) != 0 and 'dummyHarvesting' not in harvestingList :
2178  print("The following harvesting could not be found : ", harvestingList)
2179  raise Exception("The following harvesting could not be found : "+str(harvestingList))
2180 
2181 
2182 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
#define str(s)

◆ prepare_ALCAOUTPUT()

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

Definition at line 1330 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.prepare_ALCA().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER().

1330  def prepare_ALCAOUTPUT(self, stepSpec = None):
1331  self.prepare_ALCA(stepSpec, workflow = "output")
1332 

◆ prepare_ALCAPRODUCER()

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

Definition at line 1327 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

1327  def prepare_ALCAPRODUCER(self, stepSpec = None):
1328  self.prepare_ALCA(stepSpec, workflow = "producers")
1329 

◆ prepare_CFWRITER()

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

Definition at line 1541 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI().

1541  def prepare_CFWRITER(self, stepSpec = None):
1542  """ Enrich the schedule with the crossing frame writer step"""
1543  self.loadAndRemember(self.CFWRITERDefaultCFF)
1544  self.scheduleSequence('pcfw','cfwriter_step')
1545  return
1546 

◆ prepare_DATAMIX()

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

Definition at line 1547 of file ConfigBuilder.py.

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().

1547  def prepare_DATAMIX(self, stepSpec = None):
1548  """ Enrich the schedule with the digitisation step"""
1549  self.loadAndRemember(self.DATAMIXDefaultCFF)
1550  self.scheduleSequence('pdatamix','datamixing_step')
1551 
1552  if self._options.pileup_input:
1553  theFiles=''
1554  if self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:'):
1555  theFiles=filesFromDASQuery('file dataset = %s'%(self._options.pileup_input[4:],),self._options.pileup_dasoption)[0]
1556  elif self._options.pileup_input.startswith("filelist:"):
1557  theFiles= (filesFromList(self._options.pileup_input[9:]))[0]
1558  else:
1559  theFiles=self._options.pileup_input.split(',')
1560  #print theFiles
1561  self.executeAndRemember( "process.mixData.input.fileNames = cms.untracked.vstring(%s)"%( theFiles ) )
1562 
1563  return
1564 
def filesFromDASQuery(query, option="", s=None)
def filesFromList(fileName, s=None)

◆ prepare_DIGI()

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

Definition at line 1521 of file ConfigBuilder.py.

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().

1521  def prepare_DIGI(self, stepSpec = None):
1522  """ Enrich the schedule with the digitisation step"""
1523  _,_digiSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DIGIDefaultCFF)
1524 
1525  if self._options.gflash==True:
1526  self.loadAndRemember("Configuration/StandardSequences/GFlashDIGI_cff")
1527 
1528  if _digiSeq == 'pdigi_valid' or _digiSeq == 'pdigi_hi':
1529  self.executeAndRemember("process.mix.digitizers = cms.PSet(process.theDigitizersValid)")
1530 
1531  if _digiSeq != 'pdigi_nogen' and _digiSeq != 'pdigi_valid_nogen' and _digiSeq != 'pdigi_hi_nogen' and not self.process.source.type_()=='EmptySource' and not self._options.filetype == "LHE":
1532  if self._options.inputEventContent=='':
1533  self._options.inputEventContent='REGEN'
1534  else:
1535  self._options.inputEventContent=self._options.inputEventContent+',REGEN'
1536 
1537 
1538  self.scheduleSequence(_digiSeq,'digitisation_step')
1539  return
1540 

◆ prepare_DIGI2RAW()

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

Definition at line 1565 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DATAMIX().

1565  def prepare_DIGI2RAW(self, stepSpec = None):
1566  _,_digi2rawSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DIGI2RAWDefaultCFF)
1567  self.scheduleSequence(_digi2rawSeq,'digi2raw_step')
1568  return
1569 

◆ prepare_DQM()

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

Definition at line 2064 of file ConfigBuilder.py.

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, and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.expandMapping().

2064  def prepare_DQM(self, stepSpec = 'DQMOffline'):
2065  # this one needs replacement
2066 
2067  # any 'DQM' job should use DQMStore in non-legacy mode (but not HARVESTING)
2068  self.loadAndRemember("DQMServices/Core/DQMStoreNonLegacy_cff")
2069  _,_dqmSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DQMOFFLINEDefaultCFF)
2070  sequenceList=_dqmSeq.split('+')
2071  postSequenceList=_dqmSeq.split('+')
2072  from DQMOffline.Configuration.autoDQM import autoDQM
2073  self.expandMapping(sequenceList,autoDQM,index=0)
2074  self.expandMapping(postSequenceList,autoDQM,index=1)
2075 
2076  if len(set(sequenceList))!=len(sequenceList):
2077  sequenceList=list(OrderedSet(sequenceList))
2078  print("Duplicate entries for DQM:, using",sequenceList)
2079 
2080  pathName='dqmoffline_step'
2081  for (i,_sequence) in enumerate(sequenceList):
2082  if (i!=0):
2083  pathName='dqmoffline_%d_step'%(i)
2084 
2085  if 'HLT' in self.stepMap.keys() or self._options.hltProcess:
2086  self.renameHLTprocessInSequence(_sequence)
2087 
2088  setattr(self.process,pathName, cms.EndPath( getattr(self.process,_sequence ) ) )
2089  self.schedule.append(getattr(self.process,pathName))
2090 
2091  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
2092  #will get in the schedule, smoothly
2093  getattr(self.process,pathName).insert(0,self.process.genstepfilter)
2094 
2095 
2096  pathName='dqmofflineOnPAT_step'
2097  for (i,_sequence) in enumerate(postSequenceList):
2098  #Fix needed to avoid duplication of sequences not defined in autoDQM or without a PostDQM
2099  if (sequenceList[i]==postSequenceList[i]):
2100  continue
2101  if (i!=0):
2102  pathName='dqmofflineOnPAT_%d_step'%(i)
2103 
2104  setattr(self.process,pathName, cms.EndPath( getattr(self.process, _sequence ) ) )
2105  self.schedule.append(getattr(self.process,pathName))
2106 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50

◆ prepare_ENDJOB()

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

Definition at line 2183 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

2183  def prepare_ENDJOB(self, stepSpec = 'endOfProcess'):
2184  _,_endjobSeq,_=self.loadDefaultOrSpecifiedCFF(stepSpec,self.ENDJOBDefaultCFF)
2185  self.scheduleSequenceAtEnd(_endjobSeq,'endjob_step')
2186  return
2187 

◆ prepare_FILTER()

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

Definition at line 1691 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.__init__(), ConfigBuilder.ConfigBuilder.inliner, VisualizationOptions.load(), BTagCalibrationReader::BTagCalibrationReaderImpl.load(), BTagCalibrationReader.load(), CSCL1TPLookupTableEP.load(), cond::persistency::GTEditor.load(), L1MuDTPtaLut.load(), L1MuDTPhiLut.load(), cond::persistency::IOVEditor.load(), L1MuDTEtaPatternLut.load(), L1MuDTQualPatternLut.load(), PiecewiseScalingPolynomial.load(), L1MuDTExtLut.load(), HBHENegativeEFilter.load(), HBHEChannelGroups.load(), HcalIndexLookup.load(), cond::persistency::RunInfoProxy.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().

1691  def prepare_FILTER(self, stepSpec = None):
1692  ''' Enrich the schedule with a user defined filter sequence '''
1693 
1694  filterConfig,filterSeq = stepSpec.split('.')
1695  filterConfig=self.load(filterConfig)
1696 
1697  class PrintAllModules(object):
1698  def __init__(self):
1699  self.inliner=''
1700  pass
1701  def enter(self,visitee):
1702  try:
1703  label=visitee.label()
1704 
1705  self.inliner=label+','+self.inliner
1706  except:
1707  pass
1708  def leave(self,v): pass
1709 
1710  expander=PrintAllModules()
1711  getattr(self.process,filterSeq).visit( expander )
1712  self._options.inlineObjects+=','+expander.inliner
1713  self._options.inlineObjects+=','+filterSeq
1714 
1715 
1716  self.scheduleSequence(filterSeq,'filtering_step')
1717  self.nextScheduleIsConditional=True
1718 
1719  self.productionFilterSequence = filterSeq
1720 
1721  return
1722 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

◆ prepare_GEN()

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

Definition at line 1416 of file ConfigBuilder.py.

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.

1416  def prepare_GEN(self, stepSpec = None):
1417  """ load the fragment of generator configuration """
1418  loadFailure=False
1419  #remove trailing .py
1420  #support old style .cfi by changing into something.cfi into something_cfi
1421  #remove python/ from the name
1422  loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','')
1423  #standard location of fragments
1424  if not '/' in loadFragment:
1425  loadFragment='Configuration.Generator.'+loadFragment
1426  else:
1427  loadFragment=loadFragment.replace('/','.')
1428  try:
1429  print("Loading generator fragment from",loadFragment)
1430  __import__(loadFragment)
1431  except:
1432  loadFailure=True
1433  #if self.process.source and self.process.source.type_()=='EmptySource':
1434  if not (self._options.filein or self._options.dasquery):
1435  raise Exception("Neither gen fragment of input files provided: this is an inconsistent GEN step configuration")
1436 
1437  if not loadFailure:
1438  from Configuration.Generator.concurrentLumisDisable import noConcurrentLumiGenerators
1439 
1440  generatorModule=sys.modules[loadFragment]
1441  genModules=generatorModule.__dict__
1442  #remove lhe producer module since this should have been
1443  #imported instead in the LHE step
1444  if self.LHEDefaultSeq in genModules:
1445  del genModules[self.LHEDefaultSeq]
1446 
1447  if self._options.hideGen:
1448  self.loadAndRemember(loadFragment)
1449  else:
1450  self.process.load(loadFragment)
1451  # expose the objects from that fragment to the configuration
1452  import FWCore.ParameterSet.Modules as cmstypes
1453  for name in genModules:
1454  theObject = getattr(generatorModule,name)
1455  if isinstance(theObject, cmstypes._Module):
1456  self._options.inlineObjects=name+','+self._options.inlineObjects
1457  if theObject.type_() in noConcurrentLumiGenerators:
1458  print("Setting numberOfConcurrentLuminosityBlocks=1 because of generator {}".format(theObject.type_()))
1459  self._options.nConcurrentLumis = 1
1460  self._options.nConcurrentIOVs = 1
1461  elif isinstance(theObject, cms.Sequence) or isinstance(theObject, cmstypes.ESProducer):
1462  self._options.inlineObjects+=','+name
1463 
1464  if stepSpec == self.GENDefaultSeq or stepSpec == 'pgen_genonly' or stepSpec == 'pgen_smear':
1465  if 'ProductionFilterSequence' in genModules and ('generator' in genModules):
1466  self.productionFilterSequence = 'ProductionFilterSequence'
1467  elif 'generator' in genModules:
1468  self.productionFilterSequence = 'generator'
1469 
1470  """ Enrich the schedule with the rest of the generation step """
1471  _,_genSeqName,_=self.loadDefaultOrSpecifiedCFF(stepSpec,self.GENDefaultCFF)
1472 
1473  if True:
1474  try:
1475  from Configuration.StandardSequences.VtxSmeared import VtxSmeared
1476  cffToBeLoaded=VtxSmeared[self._options.beamspot]
1477  self.loadAndRemember(cffToBeLoaded)
1478  except ImportError:
1479  raise Exception("VertexSmearing type or beamspot "+self._options.beamspot+" unknown.")
1480 
1481  if self._options.scenario == 'HeavyIons':
1482  if self._options.pileup=='HiMixGEN':
1483  self.loadAndRemember("Configuration/StandardSequences/GeneratorMix_cff")
1484  elif self._options.pileup=='HiMixEmbGEN':
1485  self.loadAndRemember("Configuration/StandardSequences/GeneratorEmbMix_cff")
1486  else:
1487  self.loadAndRemember("Configuration/StandardSequences/GeneratorHI_cff")
1488 
1489  self.process.generation_step = cms.Path( getattr(self.process,_genSeqName) )
1490  self.schedule.append(self.process.generation_step)
1491 
1492  #register to the genstepfilter the name of the path (static right now, but might evolve)
1493  self.executeAndRemember('process.genstepfilter.triggerConditions=cms.vstring("generation_step")')
1494 
1495  if 'reGEN' in self.stepMap:
1496  #stop here
1497  return
1498 
1499  """ Enrich the schedule with the summary of the filter step """
1500  #the gen filter in the endpath
1501  self.loadAndRemember("GeneratorInterface/Core/genFilterSummary_cff")
1502  self.scheduleSequenceAtEnd('genFilterSummary','genfiltersummary_step')
1503  return
1504 
def replace(string, replacements)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def load(fileName)
Definition: svgfig.py:547

◆ prepare_HARVESTING()

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

Definition at line 2107 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

2107  def prepare_HARVESTING(self, stepSpec = None):
2108  """ Enrich the process with harvesting step """
2109  self.DQMSaverCFF='Configuration/StandardSequences/DQMSaver'+self._options.harvesting+'_cff'
2110  self.loadAndRemember(self.DQMSaverCFF)
2111 
2112  harvestingConfig,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.HARVESTINGDefaultCFF)
2113 
2114  # decide which HARVESTING paths to use
2115  harvestingList = sequence.split("+")
2116  from DQMOffline.Configuration.autoDQM import autoDQM
2117  from Validation.Configuration.autoValidation import autoValidation
2118  import copy
2119  combined_mapping = copy.deepcopy( autoDQM )
2120  combined_mapping.update( autoValidation )
2121  self.expandMapping(harvestingList,combined_mapping,index=-1)
2122 
2123  if len(set(harvestingList))!=len(harvestingList):
2124  harvestingList=list(OrderedSet(harvestingList))
2125  print("Duplicate entries for HARVESTING, using",harvestingList)
2126 
2127  for name in harvestingList:
2128  if not name in harvestingConfig.__dict__:
2129  print(name,"is not a possible harvesting type. Available are",harvestingConfig.__dict__.keys())
2130  # trigger hard error, like for other sequence types
2131  getattr(self.process, name)
2132  continue
2133  harvestingstream = getattr(harvestingConfig,name)
2134  if isinstance(harvestingstream,cms.Path):
2135  self.schedule.append(harvestingstream)
2136  self.blacklist_paths.append(harvestingstream)
2137  if isinstance(harvestingstream,cms.Sequence):
2138  setattr(self.process,name+"_step",cms.Path(harvestingstream))
2139  self.schedule.append(getattr(self.process,name+"_step"))
2140 
2141  # # NOTE: the "hltProcess" option currently does nothing in the HARVEST step
2142  # if self._options.hltProcess or ('HLT' in self.stepMap):
2143  # pass
2144 
2145  self.scheduleSequence('DQMSaver','dqmsave_step')
2146  return
2147 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ prepare_HLT()

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

Definition at line 1594 of file ConfigBuilder.py.

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(), ConfigBuilder.ConfigBuilder.schedule, and ConfigBuilder.ConfigBuilder.scheduleIndexOfFirstHLTPath.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1REPACK().

1594  def prepare_HLT(self, stepSpec = None):
1595  """ Enrich the schedule with the HLT simulation step"""
1596  if not stepSpec:
1597  print("no specification of the hlt menu has been given, should never happen")
1598  raise Exception('no HLT specifications provided')
1599 
1600  if '@' in stepSpec:
1601  # case where HLT:@something was provided
1602  from Configuration.HLT.autoHLT import autoHLT
1603  key = stepSpec[1:]
1604  if key in autoHLT:
1605  stepSpec = autoHLT[key]
1606  else:
1607  raise ValueError('no HLT mapping key "%s" found in autoHLT' % key)
1608 
1609  if ',' in stepSpec:
1610  #case where HLT:something:something was provided
1611  self.executeAndRemember('import HLTrigger.Configuration.Utilities')
1612  optionsForHLT = {}
1613  if self._options.scenario == 'HeavyIons':
1614  optionsForHLT['type'] = 'HIon'
1615  else:
1616  optionsForHLT['type'] = 'GRun'
1617  optionsForHLTConfig = ', '.join('%s=%s' % (key, repr(val)) for (key, val) in optionsForHLT.items())
1618  if stepSpec == 'run,fromSource':
1619  if hasattr(self.process.source,'firstRun'):
1620  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.firstRun.value()),%s)'%(optionsForHLTConfig))
1621  elif hasattr(self.process.source,'setRunNumber'):
1622  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.setRunNumber.value()),%s)'%(optionsForHLTConfig))
1623  else:
1624  raise Exception(f'Cannot replace menu to load {stepSpec}')
1625  else:
1626  self.executeAndRemember('process.loadHltConfiguration("%s",%s)'%(stepSpec.replace(',',':'),optionsForHLTConfig))
1627  else:
1628  self.loadAndRemember('HLTrigger/Configuration/HLT_%s_cff' % stepSpec)
1629 
1630  if self._options.isMC:
1631  self._options.customisation_file.append("HLTrigger/Configuration/customizeHLTforMC.customizeHLTforMC")
1632 
1633  if self._options.name != 'HLT':
1634  self.additionalCommands.append('from HLTrigger.Configuration.CustomConfigs import ProcessName')
1635  self.additionalCommands.append('process = ProcessName(process)')
1636  self.additionalCommands.append('')
1637  from HLTrigger.Configuration.CustomConfigs import ProcessName
1638  self.process = ProcessName(self.process)
1639 
1640  if self.process.schedule == None:
1641  raise Exception('the HLT step did not attach a valid schedule to the process')
1642 
1643  self.scheduleIndexOfFirstHLTPath = len(self.schedule)
1644  [self.blacklist_paths.append(path) for path in self.process.schedule if isinstance(path,(cms.Path,cms.EndPath))]
1645 
1646  # this is a fake, to be removed with fastim migration and HLT menu dump
1647  if self._options.fast:
1648  if not hasattr(self.process,'HLTEndSequence'):
1649  self.executeAndRemember("process.HLTEndSequence = cms.Sequence( process.dummyModule )")
1650 
1651 
def ProcessName(process)
Definition: CustomConfigs.py:6
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ prepare_L1()

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

Definition at line 1575 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_REPACK().

1575  def prepare_L1(self, stepSpec = None):
1576  """ Enrich the schedule with the L1 simulation step"""
1577  assert(stepSpec == None)
1578  self.loadAndRemember(self.L1EMDefaultCFF)
1579  self.scheduleSequence('SimL1Emulator','L1simulation_step')
1580  return
1581 
assert(be >=bs)

◆ prepare_L1HwVal()

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

Definition at line 1673 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATFILTER().

1673  def prepare_L1HwVal(self, stepSpec = 'L1HwVal'):
1674  ''' Enrich the schedule with L1 HW validation '''
1675  self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1HwValDefaultCFF)
1676  print('\n\n\n DEPRECATED this has no action \n\n\n')
1677  return
1678 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ prepare_L1Reco()

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

Definition at line 1679 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1HwVal().

1679  def prepare_L1Reco(self, stepSpec = "L1Reco"):
1680  ''' Enrich the schedule with L1 reconstruction '''
1681  _,_l1recoSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1RecoDefaultCFF)
1682  self.scheduleSequence(_l1recoSeq,'L1Reco_step')
1683  return
1684 

◆ prepare_L1REPACK()

def ConfigBuilder.ConfigBuilder.prepare_L1REPACK (   self,
  stepSpec = 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 1582 of file ConfigBuilder.py.

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().

1582  def prepare_L1REPACK(self, stepSpec = None):
1583  """ 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"""
1584  supported = ['GT','GT1','GT2','GCTGT','Full','FullSimTP','FullMC','Full2015Data','uGT','CalouGT']
1585  if stepSpec in supported:
1586  self.loadAndRemember('Configuration/StandardSequences/SimL1EmulatorRepack_%s_cff'% stepSpec)
1587  if self._options.scenario == 'HeavyIons':
1588  self.renameInputTagsInSequence("SimL1Emulator","rawDataCollector","rawDataRepacker")
1589  self.scheduleSequence('SimL1Emulator','L1RePack_step')
1590  else:
1591  print("L1REPACK with '",stepSpec,"' is not supported! Supported choices are: ",supported)
1592  raise Exception('unsupported feature')
1593 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ prepare_L1TrackTrigger()

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

Definition at line 1685 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1Reco().

1685  def prepare_L1TrackTrigger(self, stepSpec = "L1TrackTrigger"):
1686  ''' Enrich the schedule with L1 reconstruction '''
1687  _,_l1tracktriggerSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1TrackTriggerDefaultCFF)
1688  self.scheduleSequence(_l1tracktriggerSeq,'L1TrackTrigger_step')
1689  return
1690 

◆ prepare_LHE()

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

Definition at line 1399 of file ConfigBuilder.py.

1399  def prepare_LHE(self, stepSpec = None):
1400  #load the fragment
1401 
1402  loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','').replace('/','.')
1403  print("Loading lhe fragment from",loadFragment)
1404  __import__(loadFragment)
1405  self.process.load(loadFragment)
1406 
1407  self._options.inlineObjects+=','+stepSpec
1408 
1409  getattr(self.process,stepSpec).nEvents = self._options.number
1410 
1411  #schedule it
1412  self.process.lhe_step = cms.Path( getattr( self.process,stepSpec) )
1413  self.excludedPaths.append("lhe_step")
1414  self.schedule.append( self.process.lhe_step )
1415 
def replace(string, replacements)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def load(fileName)
Definition: svgfig.py:547

◆ prepare_NANO()

def ConfigBuilder.ConfigBuilder.prepare_NANO (   self,
  stepSpec = '' 
)

Definition at line 1776 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder._options, autoNANO.expandNanoMapping(), join(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.NANODefaultCFF, ConfigBuilder.ConfigBuilder.NANODefaultCustom, ConfigBuilder.ConfigBuilder.NANODefaultSeq, ConfigBuilder.ConfigBuilder.prepare_NANOGEN(), print(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

1776  def prepare_NANO(self, stepSpec = '' ):
1777  print(f"in prepare_nano {stepSpec}")
1778  ''' Enrich the schedule with NANO '''
1779  _,_nanoSeq,_nanoCff = self.loadDefaultOrSpecifiedCFF(stepSpec,self.NANODefaultCFF,self.NANODefaultSeq)
1780 
1781  # create full specified sequence using autoNANO
1782  from PhysicsTools.NanoAOD.autoNANO import autoNANO, expandNanoMapping
1783  # if not a autoNANO mapping, load an empty customization, which later will be converted into the default.
1784  _nanoCustoms = _nanoSeq.split('+') if '@' in stepSpec else ['']
1785  _nanoSeq = _nanoSeq.split('+')
1786  expandNanoMapping(_nanoSeq, autoNANO, 'sequence')
1787  expandNanoMapping(_nanoCustoms, autoNANO, 'customize')
1788  # make sure there are no duplicates while preserving the ordering
1789  _nanoSeq = list(sorted(set(_nanoSeq), key=_nanoSeq.index))
1790  _nanoCustoms = list(sorted(set(_nanoCustoms), key=_nanoCustoms.index))
1791  # replace empty sequence with default
1792  _nanoSeq = [seq if seq!='' else self.NANODefaultSeq for seq in _nanoSeq]
1793  _nanoCustoms = [cust if cust!='' else self.NANODefaultCustom for cust in _nanoCustoms]
1794  # build and inject the sequence
1795  if len(_nanoSeq) < 1 and '@' in stepSpec:
1796  raise Exception(f'The specified mapping: {stepSpec} generates an empty NANO sequence. Please provide a valid mappign')
1797  self.scheduleSequence('+'.join(_nanoSeq), 'nanoAOD_step')
1798 
1799  # add the customisations
1800  for custom in _nanoCustoms:
1801  custom_path = custom if '.' in custom else '.'.join([_nanoCff,custom])
1802  # customization order can be important for NANO, here later specified customise take precedence
1803  self._options.customisation_file.append(custom_path)
1804  if self._options.hltProcess:
1805  if len(self._options.customise_commands) > 1:
1806  self._options.customise_commands = self._options.customise_commands + " \n"
1807  self._options.customise_commands = self._options.customise_commands + "process.unpackedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1808 
def expandNanoMapping(seqList, mapping, key)
Definition: autoNANO.py:1
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ prepare_NANOGEN()

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

Definition at line 1809 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

1809  def prepare_NANOGEN(self, stepSpec = "nanoAOD"):
1810  ''' Enrich the schedule with NANOGEN '''
1811  # TODO: Need to modify this based on the input file type
1812  fromGen = any([x in self.stepMap for x in ['LHE', 'GEN', 'AOD']])
1813  _,_nanogenSeq,_nanogenCff = self.loadDefaultOrSpecifiedCFF(stepSpec,self.NANOGENDefaultCFF)
1814  self.scheduleSequence(_nanogenSeq,'nanoAOD_step')
1815  custom = "customizeNanoGEN" if fromGen else "customizeNanoGENFromMini"
1816  if self._options.runUnscheduled:
1817  self._options.customisation_file_unsch.insert(0, '.'.join([_nanogenCff, custom]))
1818  else:
1819  self._options.customisation_file.insert(0, '.'.join([_nanogenCff, custom]))
1820 
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ prepare_PAT()

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

Definition at line 1744 of file ConfigBuilder.py.

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().

1744  def prepare_PAT(self, stepSpec = "miniAOD"):
1745  ''' Enrich the schedule with PAT '''
1746  self.prepare_PATFILTER(self)
1747  self.loadDefaultOrSpecifiedCFF(stepSpec,self.PATDefaultCFF)
1748  self.labelsToAssociate.append('patTask')
1749  if self._options.isData:
1750  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllData")
1751  else:
1752  if self._options.fast:
1753  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMCFastSim")
1754  else:
1755  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMC")
1756 
1757  if self._options.hltProcess:
1758  if len(self._options.customise_commands) > 1:
1759  self._options.customise_commands = self._options.customise_commands + " \n"
1760  self._options.customise_commands = self._options.customise_commands + "process.patTrigger.processName = \""+self._options.hltProcess+"\"\n"
1761  self._options.customise_commands = self._options.customise_commands + "process.slimmedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1762  self._options.customise_commands = self._options.customise_commands + "process.patMuons.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1763 
1764 # self.renameHLTprocessInSequence(sequence)
1765 
1766  return
1767 

◆ prepare_PATFILTER()

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

Definition at line 1667 of file ConfigBuilder.py.

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().

1667  def prepare_PATFILTER(self, stepSpec = None):
1668  self.loadAndRemember("PhysicsTools/PatAlgos/slimming/metFilterPaths_cff")
1669  from PhysicsTools.PatAlgos.slimming.metFilterPaths_cff import allMetFilterPaths
1670  for filt in allMetFilterPaths:
1671  self.schedule.append(getattr(self.process,'Flag_'+filt))
1672 

◆ prepare_PATGEN()

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

Definition at line 1768 of file ConfigBuilder.py.

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().

1768  def prepare_PATGEN(self, stepSpec = "miniGEN"):
1769  ''' Enrich the schedule with PATGEN '''
1770  self.loadDefaultOrSpecifiedCFF(stepSpec,self.PATGENDefaultCFF) #this is unscheduled
1771  self.labelsToAssociate.append('patGENTask')
1772  if self._options.isData:
1773  raise Exception("PATGEN step can only run on MC")
1774  return
1775 

◆ prepare_POSTRECO()

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

Definition at line 1882 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_USER().

1882  def prepare_POSTRECO(self, stepSpec = None):
1883  """ Enrich the schedule with the postreco step """
1884  self.loadAndRemember(self.POSTRECODefaultCFF)
1885  self.scheduleSequence('postreco_generator','postreco_step')
1886  return
1887 
1888 

◆ prepare_RAW2DIGI()

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

Definition at line 1662 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2RECO().

1662  def prepare_RAW2DIGI(self, stepSpec = "RawToDigi"):
1663  _,_raw2digiSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RAW2DIGIDefaultCFF)
1664  self.scheduleSequence(_raw2digiSeq,'raw2digi_step')
1665  return
1666 

◆ prepare_RAW2RECO()

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

Definition at line 1652 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_HLT().

1652  def prepare_RAW2RECO(self, stepSpec = None):
1653  if ','in stepSpec:
1654  seqReco,seqDigi=stepSpec.spli(',')
1655  else:
1656  print(f"RAW2RECO requires two specifications {stepSpec} insufficient")
1657 
1658  self.prepare_RAW2DIGI(seqDigi)
1659  self.prepare_RECO(seqReco)
1660  return
1661 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ prepare_RECO()

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

Definition at line 1723 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2RECO().

1723  def prepare_RECO(self, stepSpec = "reconstruction"):
1724  ''' Enrich the schedule with reconstruction '''
1725  _,_recoSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RECODefaultCFF)
1726  self.scheduleSequence(_recoSeq,'reconstruction_step')
1727  return
1728 

◆ prepare_RECOBEFMIX()

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

Definition at line 1735 of file ConfigBuilder.py.

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().

1735  def prepare_RECOBEFMIX(self, stepSpec = "reconstruction"):
1736  ''' Enrich the schedule with the part of reconstruction that is done before mixing in FastSim'''
1737  if not self._options.fast:
1738  print("ERROR: this step is only implemented for FastSim")
1739  sys.exit()
1740  _,_recobefmixSeq,_ = self.loadDefaultOrSpecifiedCFF(self.RECOBEFMIXDefaultSeq,self.RECOBEFMIXDefaultCFF)
1741  self.scheduleSequence(_recobefmixSeq,'reconstruction_befmix_step')
1742  return
1743 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ prepare_RECOSIM()

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

Definition at line 1729 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECO().

1729  def prepare_RECOSIM(self, stepSpec = "recosim"):
1730  ''' Enrich the schedule with reconstruction '''
1731  _,_recosimSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RECOSIMDefaultCFF)
1732  self.scheduleSequence(_recosimSeq,'recosim_step')
1733  return
1734 

◆ prepare_REPACK()

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

Definition at line 1570 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

1570  def prepare_REPACK(self, stepSpec = None):
1571  _,_repackSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.REPACKDefaultCFF)
1572  self.scheduleSequence(_repackSeq,'digi2repack_step')
1573  return
1574 

◆ prepare_SIM()

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

Definition at line 1505 of file ConfigBuilder.py.

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().

1505  def prepare_SIM(self, stepSpec = None):
1506  """ Enrich the schedule with the simulation step"""
1507  _,_simSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.SIMDefaultCFF)
1508  if not self._options.fast:
1509  if self._options.gflash==True:
1510  self.loadAndRemember("Configuration/StandardSequences/GFlashSIM_cff")
1511 
1512  if self._options.magField=='0T':
1513  self.executeAndRemember("process.g4SimHits.UseMagneticField = cms.bool(False)")
1514  else:
1515  if self._options.magField=='0T':
1516  self.executeAndRemember("process.fastSimProducer.detectorDefinition.magneticFieldZ = cms.untracked.double(0.)")
1517 
1518  self.scheduleSequence(_simSeq,'simulation_step')
1519  return
1520 

◆ prepare_SKIM()

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

Definition at line 1821 of file ConfigBuilder.py.

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, ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.SKIMDefaultCFF, and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANOGEN().

1821  def prepare_SKIM(self, stepSpec = "all"):
1822  ''' Enrich the schedule with skimming fragments'''
1823  skimConfig,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.SKIMDefaultCFF)
1824 
1825  stdHLTProcName = 'HLT'
1826  newHLTProcName = self._options.hltProcess
1827  customiseForReHLT = (newHLTProcName or (stdHLTProcName in self.stepMap)) and (newHLTProcName != stdHLTProcName)
1828  if customiseForReHLT:
1829  print("replacing %s process name - step SKIM:%s will use '%s'" % (stdHLTProcName, sequence, newHLTProcName))
1830 
1831 
1832  from Configuration.Skimming.autoSkim import autoSkim
1833  skimlist = sequence.split('+')
1834  self.expandMapping(skimlist,autoSkim)
1835 
1836  #print("dictionary for skims:", skimConfig.__dict__)
1837  for skim in skimConfig.__dict__:
1838  skimstream = getattr(skimConfig, skim)
1839 
1840  # blacklist AlCa paths so that they do not appear in the cfg
1841  if isinstance(skimstream, cms.Path):
1842  self.blacklist_paths.append(skimstream)
1843  # if enabled, apply "hltProcess" renaming to Sequences
1844  elif isinstance(skimstream, cms.Sequence):
1845  if customiseForReHLT:
1846  self.renameHLTprocessInSequence(skim, proc = newHLTProcName, HLTprocess = stdHLTProcName, verbosityLevel = 0)
1847 
1848  if not isinstance(skimstream, cms.FilteredStream):
1849  continue
1850 
1851  shortname = skim.replace('SKIMStream','')
1852  if (sequence=="all"):
1853  self.addExtraStream(skim,skimstream)
1854  elif (shortname in skimlist):
1855  self.addExtraStream(skim,skimstream)
1856  #add a DQM eventcontent for this guy
1857  if self._options.datatier=='DQM':
1858  self.process.load(self.EVTCONTDefaultCFF)
1859  skimstreamDQM = cms.FilteredStream(
1860  responsible = skimstream.responsible,
1861  name = skimstream.name+'DQM',
1862  paths = skimstream.paths,
1863  selectEvents = skimstream.selectEvents,
1864  content = self._options.datatier+'EventContent',
1865  dataTier = cms.untracked.string(self._options.datatier)
1866  )
1867  self.addExtraStream(skim+'DQM',skimstreamDQM)
1868  for i in range(skimlist.count(shortname)):
1869  skimlist.remove(shortname)
1870 
1871  if (skimlist.__len__()!=0 and sequence!="all"):
1872  print('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1873  raise Exception('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1874 
1875 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def load(fileName)
Definition: svgfig.py:547

◆ prepare_USER()

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

Definition at line 1876 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

1876  def prepare_USER(self, stepSpec = None):
1877  ''' Enrich the schedule with a user defined sequence '''
1878  _,_userSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.USERDefaultCFF)
1879  self.scheduleSequence(_userSeq,'user_step')
1880  return
1881 

◆ prepare_VALIDATION()

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

Definition at line 1889 of file ConfigBuilder.py.

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().

1889  def prepare_VALIDATION(self, stepSpec = 'validation'):
1890  print(f"{stepSpec} in preparing validation")
1891  _,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.VALIDATIONDefaultCFF)
1892  from Validation.Configuration.autoValidation import autoValidation
1893  #in case VALIDATION:something:somethingelse -> something,somethingelse
1894  if sequence.find(',')!=-1:
1895  prevalSeqName=sequence.split(',')[0].split('+')
1896  valSeqName=sequence.split(',')[1].split('+')
1897  self.expandMapping(prevalSeqName,autoValidation,index=0)
1898  self.expandMapping(valSeqName,autoValidation,index=1)
1899  else:
1900  if '@' in sequence:
1901  prevalSeqName=sequence.split('+')
1902  valSeqName=sequence.split('+')
1903  self.expandMapping(prevalSeqName,autoValidation,index=0)
1904  self.expandMapping(valSeqName,autoValidation,index=1)
1905  else:
1906  postfix=''
1907  if sequence:
1908  postfix='_'+sequence
1909  prevalSeqName=['prevalidation'+postfix]
1910  valSeqName=['validation'+postfix]
1911  if not hasattr(self.process,valSeqName[0]):
1912  prevalSeqName=['']
1913  valSeqName=[sequence]
1914 
1915  def NFI(index):
1916 
1917  if index==0:
1918  return ''
1919  else:
1920  return '%s'%index
1921 
1922 
1923  #rename the HLT process in validation steps
1924  if ('HLT' in self.stepMap and not self._options.fast) or self._options.hltProcess:
1925  for s in valSeqName+prevalSeqName:
1926  if s:
1927  self.renameHLTprocessInSequence(s)
1928  for (i,s) in enumerate(prevalSeqName):
1929  if s:
1930  setattr(self.process,'prevalidation_step%s'%NFI(i), cms.Path( getattr(self.process, s)) )
1931  self.schedule.append(getattr(self.process,'prevalidation_step%s'%NFI(i)))
1932 
1933  for (i,s) in enumerate(valSeqName):
1934  setattr(self.process,'validation_step%s'%NFI(i), cms.EndPath( getattr(self.process, s)))
1935  self.schedule.append(getattr(self.process,'validation_step%s'%NFI(i)))
1936 
1937  #needed in case the miniAODValidation sequence is run starting from AODSIM
1938  if 'PAT' in self.stepMap and not 'RECO' in self.stepMap:
1939  return
1940 
1941  if not 'DIGI' in self.stepMap and not self._options.fast and not any(map( lambda s : s.startswith('genvalid'), valSeqName)):
1942  if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True:
1943  self._options.restoreRNDSeeds=True
1944 
1945  if not 'DIGI' in self.stepMap and not self._options.isData and not self._options.fast:
1946  self.executeAndRemember("process.mix.playback = True")
1947  self.executeAndRemember("process.mix.digitizers = cms.PSet()")
1948  self.executeAndRemember("for a in process.aliases: delattr(process, a)")
1949  self._options.customisation_file.append("SimGeneral/MixingModule/fullMixCustomize_cff.setCrossingFrameOn")
1950 
1951  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
1952  #will get in the schedule, smoothly
1953  for (i,s) in enumerate(valSeqName):
1954  getattr(self.process,'validation_step%s'%NFI(i)).insert(0, self.process.genstepfilter)
1955 
1956  return
1957 
1958 
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50

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

References ConfigBuilder.ConfigBuilder._options, alcaDQMUpload.encode(), createfilelist.int, and str.

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

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

◆ renameHLTprocessInSequence()

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

Definition at line 2028 of file ConfigBuilder.py.

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_SKIM(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), and ConfigBuilder.ConfigBuilder.renameInputTagsInSequence().

2028  def renameHLTprocessInSequence(self, sequence, proc=None, HLTprocess='HLT', verbosityLevel=1):
2029  if proc == None:
2030  proc = self._options.hltProcess if self._options.hltProcess else self.process.name_()
2031  if proc == HLTprocess:
2032  return
2033  # look up all module in sequence
2034  if verbosityLevel > 0:
2035  print("replacing %s process name - sequence %s will use '%s'" % (HLTprocess, sequence, proc))
2036  verboseVisit = (verbosityLevel > 1)
2037  getattr(self.process,sequence).visit(
2038  ConfigBuilder.MassSearchReplaceProcessNameVisitor(HLTprocess, proc, whitelist = ("subSystemFolder",), verbose = verboseVisit))
2039  if 'from Configuration.Applications.ConfigBuilder import ConfigBuilder' not in self.additionalCommands:
2040  self.additionalCommands.append('from Configuration.Applications.ConfigBuilder import ConfigBuilder')
2041  self.additionalCommands.append(
2042  'process.%s.visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor("%s", "%s", whitelist = ("subSystemFolder",), verbose = %s))'
2043  % (sequence, HLTprocess, proc, verboseVisit))
2044 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ renameInputTagsInSequence()

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

Definition at line 2018 of file ConfigBuilder.py.

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().

2018  def renameInputTagsInSequence(self,sequence,oldT="rawDataCollector",newT="rawDataRepacker"):
2019  print("Replacing all InputTag %s => %s"%(oldT,newT))
2020  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
2021  massSearchReplaceAnyInputTag(getattr(self.process,sequence),oldT,newT)
2022  loadMe='from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag'
2023  if not loadMe in self.additionalCommands:
2024  self.additionalCommands.append(loadMe)
2025  self.additionalCommands.append('massSearchReplaceAnyInputTag(process.%s,"%s","%s",False,True)'%(sequence,oldT,newT))
2026 
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:79
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ scheduleSequence()

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

Definition at line 1294 of file ConfigBuilder.py.

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_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().

1294  def scheduleSequence(self,seq,prefix,what='Path'):
1295  if '*' in seq:
1296  #create only one path with all sequences in it
1297  for i,s in enumerate(seq.split('*')):
1298  if i==0:
1299  setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, s) ))
1300  else:
1301  p=getattr(self.process,prefix)
1302  tmp = getattr(self.process, s)
1303  if isinstance(tmp, cms.Task):
1304  p.associate(tmp)
1305  else:
1306  p+=tmp
1307  self.schedule.append(getattr(self.process,prefix))
1308  return
1309  else:
1310  #create as many path as many sequences
1311  if not '+' in seq:
1312  if self.nextScheduleIsConditional:
1313  self.conditionalPaths.append(prefix)
1314  setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, seq) ))
1315  self.schedule.append(getattr(self.process,prefix))
1316  else:
1317  for i,s in enumerate(seq.split('+')):
1318  sn=prefix+'%d'%(i)
1319  setattr(self.process,sn,getattr(cms,what)( getattr(self.process, s) ))
1320  self.schedule.append(getattr(self.process,sn))
1321  return
1322 

◆ scheduleSequenceAtEnd()

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

Definition at line 1323 of file ConfigBuilder.py.

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

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

1323  def scheduleSequenceAtEnd(self,seq,prefix):
1324  self.scheduleSequence(seq,prefix,what='EndPath')
1325  return
1326 

Member Data Documentation

◆ _options

◆ addedObjects

◆ additionalCommands

◆ additionalOutputs

ConfigBuilder.ConfigBuilder.additionalOutputs

Definition at line 269 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ ALCADefaultCFF

ConfigBuilder.ConfigBuilder.ALCADefaultCFF

◆ ALCADefaultSeq

ConfigBuilder.ConfigBuilder.ALCADefaultSeq

Definition at line 1044 of file ConfigBuilder.py.

◆ ALCAHARVESTDefaultCFF

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultCFF

Definition at line 1032 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

◆ ALCAHARVESTDefaultSeq

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultSeq

Definition at line 1055 of file ConfigBuilder.py.

◆ AlCaPaths

ConfigBuilder.ConfigBuilder.AlCaPaths

◆ blacklist_paths

ConfigBuilder.ConfigBuilder.blacklist_paths

◆ CFWRITERDefaultCFF

ConfigBuilder.ConfigBuilder.CFWRITERDefaultCFF

Definition at line 1035 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_CFWRITER().

◆ CFWRITERDefaultSeq

ConfigBuilder.ConfigBuilder.CFWRITERDefaultSeq

Definition at line 1056 of file ConfigBuilder.py.

◆ conditionalPaths

ConfigBuilder.ConfigBuilder.conditionalPaths

◆ ConditionsDefaultCFF

ConfigBuilder.ConfigBuilder.ConditionsDefaultCFF

Definition at line 1034 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addConditions().

◆ DATAMIXDefaultCFF

ConfigBuilder.ConfigBuilder.DATAMIXDefaultCFF

Definition at line 1039 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DATAMIX().

◆ DATAMIXDefaultSeq

ConfigBuilder.ConfigBuilder.DATAMIXDefaultSeq

Definition at line 1049 of file ConfigBuilder.py.

◆ DIGI2RAWDefaultCFF

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultCFF

Definition at line 1013 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

◆ DIGI2RAWDefaultSeq

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultSeq

Definition at line 1050 of file ConfigBuilder.py.

◆ DIGIDefaultCFF

ConfigBuilder.ConfigBuilder.DIGIDefaultCFF

Definition at line 1012 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI().

◆ DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.DIGIDefaultSeq

Definition at line 1048 of file ConfigBuilder.py.

◆ DQMDefaultSeq

ConfigBuilder.ConfigBuilder.DQMDefaultSeq

Definition at line 1067 of file ConfigBuilder.py.

◆ DQMOFFLINEDefaultCFF

ConfigBuilder.ConfigBuilder.DQMOFFLINEDefaultCFF

Definition at line 1030 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

◆ DQMSaverCFF

ConfigBuilder.ConfigBuilder.DQMSaverCFF

Definition at line 2109 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_HARVESTING().

◆ ENDJOBDefaultCFF

ConfigBuilder.ConfigBuilder.ENDJOBDefaultCFF

Definition at line 1033 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ENDJOB().

◆ ENDJOBDefaultSeq

ConfigBuilder.ConfigBuilder.ENDJOBDefaultSeq

Definition at line 1069 of file ConfigBuilder.py.

◆ EVTCONTDefaultCFF

ConfigBuilder.ConfigBuilder.EVTCONTDefaultCFF

◆ excludedPaths

ConfigBuilder.ConfigBuilder.excludedPaths

Definition at line 275 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ GENDefaultCFF

ConfigBuilder.ConfigBuilder.GENDefaultCFF

Definition at line 1010 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GENDefaultSeq

ConfigBuilder.ConfigBuilder.GENDefaultSeq

Definition at line 1046 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GeometryCFF

ConfigBuilder.ConfigBuilder.GeometryCFF

Definition at line 1141 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ geometryDBLabel

ConfigBuilder.ConfigBuilder.geometryDBLabel

Definition at line 1142 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ HARVESTINGDefaultCFF

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultCFF

Definition at line 1031 of file ConfigBuilder.py.

◆ HARVESTINGDefaultSeq

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultSeq

Definition at line 1054 of file ConfigBuilder.py.

◆ HLTDefaultCFF

ConfigBuilder.ConfigBuilder.HLTDefaultCFF

Definition at line 1016 of file ConfigBuilder.py.

◆ HLTDefaultSeq

ConfigBuilder.ConfigBuilder.HLTDefaultSeq

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

◆ L1DefaultSeq

ConfigBuilder.ConfigBuilder.L1DefaultSeq

Definition at line 1052 of file ConfigBuilder.py.

◆ L1EMDefaultCFF

ConfigBuilder.ConfigBuilder.L1EMDefaultCFF

Definition at line 1014 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1().

◆ L1HwValDefaultCFF

ConfigBuilder.ConfigBuilder.L1HwValDefaultCFF

Definition at line 1029 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1HwVal().

◆ L1HwValDefaultSeq

ConfigBuilder.ConfigBuilder.L1HwValDefaultSeq

Definition at line 1066 of file ConfigBuilder.py.

◆ L1MENUDefaultCFF

ConfigBuilder.ConfigBuilder.L1MENUDefaultCFF

Definition at line 1015 of file ConfigBuilder.py.

◆ L1RecoDefaultCFF

ConfigBuilder.ConfigBuilder.L1RecoDefaultCFF

Definition at line 1019 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1Reco().

◆ L1RecoDefaultSeq

ConfigBuilder.ConfigBuilder.L1RecoDefaultSeq

Definition at line 1058 of file ConfigBuilder.py.

◆ L1REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.L1REPACKDefaultSeq

Definition at line 1053 of file ConfigBuilder.py.

◆ L1TrackTriggerDefaultCFF

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultCFF

◆ L1TrackTriggerDefaultSeq

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultSeq

Definition at line 1059 of file ConfigBuilder.py.

◆ labelsToAssociate

ConfigBuilder.ConfigBuilder.labelsToAssociate

◆ LHEDefaultSeq

ConfigBuilder.ConfigBuilder.LHEDefaultSeq

Definition at line 1045 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ magFieldCFF

ConfigBuilder.ConfigBuilder.magFieldCFF

Definition at line 1137 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ NANODefaultCFF

ConfigBuilder.ConfigBuilder.NANODefaultCFF

Definition at line 1024 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultCustom

ConfigBuilder.ConfigBuilder.NANODefaultCustom

Definition at line 1076 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultSeq

ConfigBuilder.ConfigBuilder.NANODefaultSeq

Definition at line 1075 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANOGENDefaultCFF

ConfigBuilder.ConfigBuilder.NANOGENDefaultCFF

Definition at line 1025 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANOGEN().

◆ NANOGENDefaultSeq

ConfigBuilder.ConfigBuilder.NANOGENDefaultSeq

Definition at line 1074 of file ConfigBuilder.py.

◆ nextScheduleIsConditional

ConfigBuilder.ConfigBuilder.nextScheduleIsConditional

put the filtering path in the schedule

Definition at line 273 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequence().

◆ PATDefaultCFF

ConfigBuilder.ConfigBuilder.PATDefaultCFF

Definition at line 1023 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PAT().

◆ PATDefaultSeq

ConfigBuilder.ConfigBuilder.PATDefaultSeq

Definition at line 1071 of file ConfigBuilder.py.

◆ PATGENDefaultCFF

ConfigBuilder.ConfigBuilder.PATGENDefaultCFF

Definition at line 1088 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

◆ PATGENDefaultSeq

ConfigBuilder.ConfigBuilder.PATGENDefaultSeq

Definition at line 1072 of file ConfigBuilder.py.

◆ POSTRECODefaultCFF

ConfigBuilder.ConfigBuilder.POSTRECODefaultCFF

Definition at line 1027 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_POSTRECO().

◆ POSTRECODefaultSeq

ConfigBuilder.ConfigBuilder.POSTRECODefaultSeq

Definition at line 1065 of file ConfigBuilder.py.

◆ process

ConfigBuilder.ConfigBuilder.process

adding standard sequences might change the inputEventContent option and therefore needs to be finalized after

Definition at line 250 of file ConfigBuilder.py.

Referenced by adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.__init__(), ConfigBuilder.ConfigBuilder.addCommon(), ConfigBuilder.ConfigBuilder.addConditions(), ConfigBuilder.ConfigBuilder.addCustomise(), ConfigBuilder.ConfigBuilder.addMaxEvents(), ConfigBuilder.ConfigBuilder.addOutput(), ConfigBuilder.ConfigBuilder.addSource(), ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.build_production_info(), ConfigBuilder.ConfigBuilder.completeInputCommand(), adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.convertModuleToMiniAODInput(), ConfigBuilder.ConfigBuilder.finalizeFastSimHLT(), ConfigBuilder.ConfigBuilder.load(), ConfigBuilder.ConfigBuilder.loadAndRemember(), runTauIdMVA.TauIDEmbedder.loadMVA_WPs_run2_2017(), ConfigBuilder.ConfigBuilder.prepare(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), ConfigBuilder.ConfigBuilder.prepare_DQM(), ConfigBuilder.ConfigBuilder.prepare_GEN(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), ConfigBuilder.ConfigBuilder.prepare_SKIM(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), runTauIdMVA.TauIDEmbedder.processDeepProducer(), ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), runTauIdMVA.TauIDEmbedder.runTauID(), ConfigBuilder.ConfigBuilder.scheduleSequence(), and runTauIdMVA.TauIDEmbedder.tauIDMVAinputs().

◆ productionFilterSequence

ConfigBuilder.ConfigBuilder.productionFilterSequence

put it before all the other paths

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI().

◆ RAW2DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.RAW2DIGIDefaultSeq

Definition at line 1057 of file ConfigBuilder.py.

◆ RAW2RECODefaultSeq

ConfigBuilder.ConfigBuilder.RAW2RECODefaultSeq

Definition at line 1131 of file ConfigBuilder.py.

◆ RECOBEFMIXDefaultCFF

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultCFF

Definition at line 1192 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECOBEFMIXDefaultSeq

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultSeq

Definition at line 1193 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECODefaultCFF

ConfigBuilder.ConfigBuilder.RECODefaultCFF

Definition at line 1021 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECO().

◆ RECODefaultSeq

ConfigBuilder.ConfigBuilder.RECODefaultSeq

Definition at line 1061 of file ConfigBuilder.py.

◆ RECOSIMDefaultCFF

ConfigBuilder.ConfigBuilder.RECOSIMDefaultCFF

Definition at line 1022 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOSIM().

◆ RECOSIMDefaultSeq

ConfigBuilder.ConfigBuilder.RECOSIMDefaultSeq

Definition at line 1064 of file ConfigBuilder.py.

◆ REDIGIDefaultSeq

ConfigBuilder.ConfigBuilder.REDIGIDefaultSeq

Definition at line 1208 of file ConfigBuilder.py.

◆ REPACKDefaultCFF

ConfigBuilder.ConfigBuilder.REPACKDefaultCFF

Definition at line 1036 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_REPACK().

◆ REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.REPACKDefaultSeq

Definition at line 1070 of file ConfigBuilder.py.

◆ runsAndWeights

ConfigBuilder.ConfigBuilder.runsAndWeights

drop LHEXMLStringProduct on input to save memory if appropriate

Definition at line 538 of file ConfigBuilder.py.

◆ runsAndWeightsInt

ConfigBuilder.ConfigBuilder.runsAndWeightsInt

Definition at line 559 of file ConfigBuilder.py.

◆ schedule

◆ scheduleIndexOfFirstHLTPath

ConfigBuilder.ConfigBuilder.scheduleIndexOfFirstHLTPath

◆ SIMDefaultCFF

ConfigBuilder.ConfigBuilder.SIMDefaultCFF

Definition at line 1011 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SIM().

◆ SIMDefaultSeq

ConfigBuilder.ConfigBuilder.SIMDefaultSeq

Definition at line 1047 of file ConfigBuilder.py.

◆ SimGeometryCFF

ConfigBuilder.ConfigBuilder.SimGeometryCFF

Definition at line 1167 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ SKIMDefaultCFF

ConfigBuilder.ConfigBuilder.SKIMDefaultCFF

Definition at line 1026 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

◆ stepKeys

ConfigBuilder.ConfigBuilder.stepKeys

Definition at line 230 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ stepMap

◆ USERDefaultCFF

ConfigBuilder.ConfigBuilder.USERDefaultCFF

Definition at line 1134 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_USER().

◆ USERDefaultSeq

ConfigBuilder.ConfigBuilder.USERDefaultSeq

Definition at line 1133 of file ConfigBuilder.py.

◆ VALIDATIONDefaultCFF

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultCFF

Definition at line 1028 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

◆ VALIDATIONDefaultSeq

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultSeq

Definition at line 1068 of file ConfigBuilder.py.

◆ with_input

ConfigBuilder.ConfigBuilder.with_input

Definition at line 254 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ with_output

ConfigBuilder.ConfigBuilder.with_output

Definition at line 249 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().