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 loadPhase2GTMenu
 
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_L1P2GT (self, stepSpec=None)
 
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_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
 
 L1P2GTDefaultCFF
 
 L1P2GTDefaultSeq
 
 L1RecoDefaultCFF
 
 L1RecoDefaultSeq
 
 L1REPACKDefaultSeq
 
 L1TrackTriggerDefaultCFF
 
 L1TrackTriggerDefaultSeq
 
 labelsToAssociate
 
 LHEDefaultSeq
 
 magFieldCFF
 
 NANODefaultCFF
 
 NANODefaultCustom
 
 NANODefaultSeq
 
 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 201 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 204 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

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

366  def addCommon(self):
367  if 'HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys():
368  self.process.options.Rethrow = ['ProductNotFound']
369  self.process.options.fileMode = 'FULLMERGE'
370 
371  self.addedObjects.append(("","options"))
372 
373  if self._options.lazy_download:
374  self.process.AdaptorConfig = cms.Service("AdaptorConfig",
375  stats = cms.untracked.bool(True),
376  enable = cms.untracked.bool(True),
377  cacheHint = cms.untracked.string("lazy-download"),
378  readHint = cms.untracked.string("read-ahead-buffered")
379  )
380  self.addedObjects.append(("Setup lazy download","AdaptorConfig"))
381 
382  #self.process.cmsDriverCommand = cms.untracked.PSet( command=cms.untracked.string('cmsDriver.py '+self._options.arguments) )
383  #self.addedObjects.append(("what cmsDriver command was used","cmsDriverCommand"))
384 
385  if self._options.profile:
386  (start, interval, eventFormat, jobFormat)=self.profileOptions()
387  self.process.IgProfService = cms.Service("IgProfService",
388  reportFirstEvent = cms.untracked.int32(start),
389  reportEventInterval = cms.untracked.int32(interval),
390  reportToFileAtPostEvent = cms.untracked.string("| gzip -c > %s"%(eventFormat)),
391  reportToFileAtPostEndJob = cms.untracked.string("| gzip -c > %s"%(jobFormat)))
392  self.addedObjects.append(("Setup IGProf Service for profiling","IgProfService"))
393 
394  if self._options.heap_profile:
395  (start, interval, eventFormat, jobFormat)=self.heapProfileOptions()
396  self.process.JeProfService = cms.Service("JeProfService",
397  reportFirstEvent = cms.untracked.int32(start),
398  reportEventInterval = cms.untracked.int32(interval),
399  reportToFileAtPostEvent = cms.untracked.string("%s"%(eventFormat)),
400  reportToFileAtPostEndJob = cms.untracked.string("%s"%(jobFormat)))
401  self.addedObjects.append(("Setup JeProf Service for heap profiling","JeProfService"))
402 

◆ addConditions()

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

Definition at line 877 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().

877  def addConditions(self):
878  """Add conditions to the process"""
879  if not self._options.conditions: return
880 
881  if 'FrontierConditions_GlobalTag' in self._options.conditions:
882  print('using FrontierConditions_GlobalTag in --conditions is not necessary anymore and will be deprecated soon. please update your command line')
883  self._options.conditions = self._options.conditions.replace("FrontierConditions_GlobalTag,",'')
884 
885  self.loadAndRemember(self.ConditionsDefaultCFF)
886  from Configuration.AlCa.GlobalTag import GlobalTag
887  self.process.GlobalTag = GlobalTag(self.process.GlobalTag, self._options.conditions, self._options.custom_conditions)
888  self.additionalCommands.append('from Configuration.AlCa.GlobalTag import GlobalTag')
889  self.additionalCommands.append('process.GlobalTag = GlobalTag(process.GlobalTag, %s, %s)' % (repr(self._options.conditions), repr(self._options.custom_conditions)))
890 
891 
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 892 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().

892  def addCustomise(self,unsch=0):
893  """Include the customise code """
894 
895  custOpt=[]
896  if unsch==0:
897  for c in self._options.customisation_file:
898  custOpt.extend(c.split(","))
899  else:
900  for c in self._options.customisation_file_unsch:
901  custOpt.extend(c.split(","))
902 
903  custMap=DictTypes.SortedKeysDict()
904  for opt in custOpt:
905  if opt=='': continue
906  if opt.count('.')>1:
907  raise Exception("more than . in the specification:"+opt)
908  fileName=opt.split('.')[0]
909  if opt.count('.')==0: rest='customise'
910  else:
911  rest=opt.split('.')[1]
912  if rest=='py': rest='customise' #catch the case of --customise file.py
913 
914  if fileName in custMap:
915  custMap[fileName].extend(rest.split('+'))
916  else:
917  custMap[fileName]=rest.split('+')
918 
919  if len(custMap)==0:
920  final_snippet='\n'
921  else:
922  final_snippet='\n# customisation of the process.\n'
923 
924  allFcn=[]
925  for opt in custMap:
926  allFcn.extend(custMap[opt])
927  for fcn in allFcn:
928  if allFcn.count(fcn)!=1:
929  raise Exception("cannot specify twice "+fcn+" as a customisation method")
930 
931  for f in custMap:
932  # let python search for that package and do syntax checking at the same time
933  packageName = f.replace(".py","").replace("/",".")
934  __import__(packageName)
935  package = sys.modules[packageName]
936 
937  # now ask the package for its definition and pick .py instead of .pyc
938  customiseFile = re.sub(r'\.pyc$', '.py', package.__file__)
939 
940  final_snippet+='\n# Automatic addition of the customisation function from '+packageName+'\n'
941  if self._options.inline_custom:
942  for line in file(customiseFile,'r'):
943  if "import FWCore.ParameterSet.Config" in line:
944  continue
945  final_snippet += line
946  else:
947  final_snippet += 'from %s import %s \n'%(packageName,','.join(custMap[f]))
948  for fcn in custMap[f]:
949  print("customising the process with",fcn,"from",f)
950  if not hasattr(package,fcn):
951  #bound to fail at run time
952  raise Exception("config "+f+" has no function "+fcn)
953  #execute the command
954  self.process=getattr(package,fcn)(self.process)
955  #and print it in the configuration
956  final_snippet += "\n#call to customisation function "+fcn+" imported from "+packageName
957  final_snippet += "\nprocess = %s(process)\n"%(fcn,)
958 
959  if len(custMap)!=0:
960  final_snippet += '\n# End of customisation functions\n'
961 
962 
963  return final_snippet
964 
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:21

◆ addCustomiseCmdLine()

def ConfigBuilder.ConfigBuilder.addCustomiseCmdLine (   self)

Definition at line 965 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().

965  def addCustomiseCmdLine(self):
966  final_snippet='\n# Customisation from command line\n'
967  if self._options.customise_commands:
968  import string
969  for com in self._options.customise_commands.split('\\n'):
970  com=com.lstrip()
971  self.executeAndRemember(com)
972  final_snippet +='\n'+com
973 
974  return final_snippet
975 

◆ addExtraStream()

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

Definition at line 1195 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

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

◆ addMaxEvents()

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

Definition at line 403 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().

403  def addMaxEvents(self):
404  """Here we decide how many evts will be processed"""
405  self.process.maxEvents.input = self._options.number
406  if self._options.number_out:
407  self.process.maxEvents.output = self._options.number_out
408  self.addedObjects.append(("","maxEvents"))
409 

◆ addOutput()

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

Definition at line 562 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 reco.zip().

Referenced by ConfigBuilder.ConfigBuilder.prepare().

562  def addOutput(self):
563  """ Add output module to the process """
564  result=""
565  if self._options.outputDefinition:
566  if self._options.datatier:
567  print("--datatier & --eventcontent options ignored")
568 
569  #new output convention with a list of dict
570  outList = eval(self._options.outputDefinition)
571  for (id,outDefDict) in enumerate(outList):
572  outDefDictStr=outDefDict.__str__()
573  if not isinstance(outDefDict,dict):
574  raise Exception("--output needs to be passed a list of dict"+self._options.outputDefinition+" is invalid")
575  #requires option: tier
576  theTier=anyOf(['t','tier','dataTier'],outDefDict)
577  #optional option: eventcontent, filtername, selectEvents, moduleLabel, filename
578 
579  theStreamType=anyOf(['e','ec','eventContent','streamType'],outDefDict,theTier)
580  theFilterName=anyOf(['f','ftN','filterName'],outDefDict,'')
581  theSelectEvent=anyOf(['s','sE','selectEvents'],outDefDict,'')
582  theModuleLabel=anyOf(['l','mL','moduleLabel'],outDefDict,'')
583  theExtraOutputCommands=anyOf(['o','oC','outputCommands'],outDefDict,'')
584  # module label has a particular role
585  if not theModuleLabel:
586  tryNames=[theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+'output',
587  theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+theFilterName+'output',
588  theStreamType.replace(theTier.replace('-',''),'')+theTier.replace('-','')+theFilterName+theSelectEvent.split(',')[0].replace(':','for').replace(' ','')+'output'
589  ]
590  for name in tryNames:
591  if not hasattr(self.process,name):
592  theModuleLabel=name
593  break
594  if not theModuleLabel:
595  raise Exception("cannot find a module label for specification: "+outDefDictStr)
596  if id==0:
597  defaultFileName=self._options.outfile_name
598  else:
599  defaultFileName=self._options.outfile_name.replace('.root','_in'+theTier+'.root')
600 
601  theFileName=self._options.dirout+anyOf(['fn','fileName'],outDefDict,defaultFileName)
602  if not theFileName.endswith('.root'):
603  theFileName+='.root'
604 
605  if len(outDefDict):
606  raise Exception("unused keys from --output options: "+','.join(outDefDict.keys()))
607  if theStreamType=='DQMIO': theStreamType='DQM'
608  if theStreamType=='ALL':
609  theEventContent = cms.PSet(outputCommands = cms.untracked.vstring('keep *'))
610  else:
611  theEventContent = getattr(self.process, theStreamType+"EventContent")
612 
613 
614  addAlCaSelects=False
615  if theStreamType=='ALCARECO' and not theFilterName:
616  theFilterName='StreamALCACombined'
617  addAlCaSelects=True
618 
619  CppType='PoolOutputModule'
620  if self._options.timeoutOutput:
621  CppType='TimeoutPoolOutputModule'
622  if theStreamType=='DQM' and theTier=='DQMIO': CppType='DQMRootOutputModule'
623  output = cms.OutputModule(CppType,
624  theEventContent.clone(),
625  fileName = cms.untracked.string(theFileName),
626  dataset = cms.untracked.PSet(
627  dataTier = cms.untracked.string(theTier),
628  filterName = cms.untracked.string(theFilterName))
629  )
630  if not theSelectEvent and hasattr(self.process,'generation_step') and theStreamType!='LHE':
631  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step'))
632  if not theSelectEvent and hasattr(self.process,'filtering_step'):
633  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filtering_step'))
634  if theSelectEvent:
635  output.SelectEvents =cms.untracked.PSet(SelectEvents = cms.vstring(theSelectEvent))
636 
637  if addAlCaSelects:
638  if not hasattr(output,'SelectEvents'):
639  output.SelectEvents=cms.untracked.PSet(SelectEvents=cms.vstring())
640  for alca in self.AlCaPaths:
641  output.SelectEvents.SelectEvents.extend(getattr(self.process,'OutALCARECO'+alca).SelectEvents.SelectEvents)
642 
643 
644  if hasattr(self.process,theModuleLabel):
645  raise Exception("the current process already has a module "+theModuleLabel+" defined")
646  #print "creating output module ",theModuleLabel
647  setattr(self.process,theModuleLabel,output)
648  outputModule=getattr(self.process,theModuleLabel)
649  setattr(self.process,theModuleLabel+'_step',cms.EndPath(outputModule))
650  path=getattr(self.process,theModuleLabel+'_step')
651  self.schedule.append(path)
652 
653  if not self._options.inlineEventContent and hasattr(self.process,theStreamType+"EventContent"):
654  def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+theStreamType+"EventContent.outputCommands)"): return label
655  outputModule.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
656  if theExtraOutputCommands:
657  if not isinstance(theExtraOutputCommands,list):
658  raise Exception("extra ouput command in --option must be a list of strings")
659  if hasattr(self.process,theStreamType+"EventContent"):
660  self.executeAndRemember('process.%s.outputCommands.extend(%s)'%(theModuleLabel,theExtraOutputCommands))
661  else:
662  outputModule.outputCommands.extend(theExtraOutputCommands)
663 
664  result+="\nprocess."+theModuleLabel+" = "+outputModule.dumpPython()
665 
666 
667  return result
668 
669  streamTypes=self._options.eventcontent.split(',')
670  tiers=self._options.datatier.split(',')
671  if not self._options.outputDefinition and len(streamTypes)!=len(tiers):
672  raise Exception("number of event content arguments does not match number of datatier arguments")
673 
674  # if the only step is alca we don't need to put in an output
675  if self._options.step.split(',')[0].split(':')[0] == 'ALCA':
676  return "\n"
677 
678  for i,(streamType,tier) in enumerate(zip(streamTypes,tiers)):
679  if streamType=='': continue
680  if streamType == 'ALCARECO' and not 'ALCAPRODUCER' in self._options.step: continue
681  if streamType=='DQMIO': streamType='DQM'
682  eventContent=streamType
683 
684  if streamType == "NANOEDMAOD" :
685  eventContent = "NANOAOD"
686  elif streamType == "NANOEDMAODSIM" :
687  eventContent = "NANOAODSIM"
688  theEventContent = getattr(self.process, eventContent+"EventContent")
689  if i==0:
690  theFileName=self._options.outfile_name
691  theFilterName=self._options.filtername
692  else:
693  theFileName=self._options.outfile_name.replace('.root','_in'+streamType+'.root')
694  theFilterName=self._options.filtername
695  CppType='PoolOutputModule'
696  if self._options.timeoutOutput:
697  CppType='TimeoutPoolOutputModule'
698  if streamType=='DQM' and tier=='DQMIO': CppType='DQMRootOutputModule'
699  if "NANOAOD" in streamType : CppType='NanoAODOutputModule'
700  output = cms.OutputModule(CppType,
701  theEventContent,
702  fileName = cms.untracked.string(theFileName),
703  dataset = cms.untracked.PSet(dataTier = cms.untracked.string(tier),
704  filterName = cms.untracked.string(theFilterName)
705  )
706  )
707  if hasattr(self.process,"generation_step") and streamType!='LHE':
708  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('generation_step'))
709  if hasattr(self.process,"filtering_step"):
710  output.SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filtering_step'))
711 
712  if streamType=='ALCARECO':
713  output.dataset.filterName = cms.untracked.string('StreamALCACombined')
714 
715  if "MINIAOD" in streamType:
716  from PhysicsTools.PatAlgos.slimming.miniAOD_tools import miniAOD_customizeOutput
718 
719  outputModuleName=streamType+'output'
720  setattr(self.process,outputModuleName,output)
721  outputModule=getattr(self.process,outputModuleName)
722  setattr(self.process,outputModuleName+'_step',cms.EndPath(outputModule))
723  path=getattr(self.process,outputModuleName+'_step')
724  self.schedule.append(path)
725 
726  if self._options.outputCommands and streamType!='DQM':
727  for evct in self._options.outputCommands.split(','):
728  if not evct: continue
729  self.executeAndRemember("process.%s.outputCommands.append('%s')"%(outputModuleName,evct.strip()))
730 
731  if not self._options.inlineEventContent:
732  tmpstreamType=streamType
733  if "NANOEDM" in tmpstreamType :
734  tmpstreamType=tmpstreamType.replace("NANOEDM","NANO")
735  def doNotInlineEventContent(instance,label = "process."+tmpstreamType+"EventContent.outputCommands"):
736  return label
737  outputModule.outputCommands.__dict__["dumpPython"] = doNotInlineEventContent
738 
739  result+="\nprocess."+outputModuleName+" = "+outputModule.dumpPython()
740 
741  return result
742 
743 
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:90
def replace(string, replacements)
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:21
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 410 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().

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

744  def addStandardSequences(self):
745  """
746  Add selected standard sequences to the process
747  """
748  # load the pile up file
749  if self._options.pileup:
750  pileupSpec=self._options.pileup.split(',')[0]
751 
752  #make sure there is a set of pileup files specified when needed
753  pileups_without_input=[defaultOptions.pileup,"Cosmics","default","HiMixNoPU",None]
754  if self._options.pileup not in pileups_without_input and self._options.pileup_input==None:
755  message = "Pileup scenerio requires input files. Please add an appropriate --pileup_input option"
756  raise Exception(message)
757 
758  # Does the requested pile-up scenario exist?
759  from Configuration.StandardSequences.Mixing import Mixing,defineMixing
760  if not pileupSpec in Mixing and '.' not in pileupSpec and 'file:' not in pileupSpec:
761  message = pileupSpec+' is not a know mixing scenario:\n available are: '+'\n'.join(Mixing.keys())
762  raise Exception(message)
763 
764  # Put mixing parameters in a dictionary
765  if '.' in pileupSpec:
766  mixingDict={'file':pileupSpec}
767  elif pileupSpec.startswith('file:'):
768  mixingDict={'file':pileupSpec[5:]}
769  else:
770  import copy
771  mixingDict=copy.copy(Mixing[pileupSpec])
772  if len(self._options.pileup.split(','))>1:
773  mixingDict.update(eval(self._options.pileup[self._options.pileup.find(',')+1:]))
774 
775  # Load the pu cfg file corresponding to the requested pu scenario
776  if 'file:' in pileupSpec:
777  #the file is local
778  self.process.load(mixingDict['file'])
779  print("inlining mixing module configuration")
780  self._options.inlineObjects+=',mix'
781  else:
782  self.loadAndRemember(mixingDict['file'])
783 
784  mixingDict.pop('file')
785  if not "DATAMIX" in self.stepMap.keys(): # when DATAMIX is present, pileup_input refers to pre-mixed GEN-RAW
786  if self._options.pileup_input:
787  if self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:'):
788  mixingDict['F']=filesFromDASQuery('file dataset = %s'%(self._options.pileup_input[4:],),self._options.pileup_dasoption)[0]
789  elif self._options.pileup_input.startswith("filelist:"):
790  mixingDict['F']=(filesFromList(self._options.pileup_input[9:]))[0]
791  else:
792  mixingDict['F']=self._options.pileup_input.split(',')
793  specialization=defineMixing(mixingDict)
794  for command in specialization:
795  self.executeAndRemember(command)
796  if len(mixingDict)!=0:
797  raise Exception('unused mixing specification: '+mixingDict.keys().__str__())
798 
799 
800  # load the geometry file
801  try:
802  if len(self.stepMap):
803  self.loadAndRemember(self.GeometryCFF)
804  if ('SIM' in self.stepMap or 'reSIM' in self.stepMap) and not self._options.fast:
805  self.loadAndRemember(self.SimGeometryCFF)
806  if self.geometryDBLabel:
807  self.executeAndRemember('if hasattr(process, "XMLFromDBSource"): process.XMLFromDBSource.label="%s"'%(self.geometryDBLabel))
808  self.executeAndRemember('if hasattr(process, "DDDetectorESProducerFromDB"): process.DDDetectorESProducerFromDB.label="%s"'%(self.geometryDBLabel))
809 
810  except ImportError:
811  print("Geometry option",self._options.geometry,"unknown.")
812  raise
813 
814  if len(self.stepMap):
815  self.loadAndRemember(self.magFieldCFF)
816 
817  for stepName in self.stepKeys:
818  stepSpec = self.stepMap[stepName]
819  print("Step:", stepName,"Spec:",stepSpec)
820  if stepName.startswith('re'):
821 
822  if stepName[2:] not in self._options.donotDropOnInput:
823  self._options.inputEventContent='%s,%s'%(stepName.upper(),self._options.inputEventContent)
824  stepName=stepName[2:]
825  if stepSpec=="":
826  getattr(self,"prepare_"+stepName)(stepSpec = getattr(self,stepName+"DefaultSeq"))
827  elif isinstance(stepSpec, list):
828  getattr(self,"prepare_"+stepName)(stepSpec = '+'.join(stepSpec))
829  elif isinstance(stepSpec, tuple):
830  getattr(self,"prepare_"+stepName)(stepSpec = ','.join([stepSpec[1],'+'.join(stepSpec[0])]))
831  else:
832  raise ValueError("Invalid step definition")
833 
834  if self._options.restoreRNDSeeds!=False:
835  #it is either True, or a process name
836  if self._options.restoreRNDSeeds==True:
837  self.executeAndRemember('process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")')
838  else:
839  self.executeAndRemember('process.RandomNumberGeneratorService.restoreStateTag=cms.untracked.InputTag("randomEngineStateProducer","","%s")'%(self._options.restoreRNDSeeds))
840  if self._options.inputEventContent or self._options.inputCommands:
841  if self._options.inputCommands:
842  self._options.inputCommands+='keep *_randomEngineStateProducer_*_*,'
843  else:
844  self._options.inputCommands='keep *_randomEngineStateProducer_*_*,'
845 
846 
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:21
def load(fileName)
Definition: svgfig.py:547
def defineMixing(dict)
Definition: Mixing.py:210
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 2217 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().

2217  def build_production_info(self, evt_type, evtnumber):
2218  """ Add useful info for the production. """
2219  self.process.configurationMetadata=cms.untracked.PSet\
2220  (version=cms.untracked.string("$Revision: 1.19 $"),
2221  name=cms.untracked.string("Applications"),
2222  annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber))
2223  )
2224 
2225  self.addedObjects.append(("Production Info","configurationMetadata"))
2226 
2227 
#define str(s)

◆ completeInputCommand()

def ConfigBuilder.ConfigBuilder.completeInputCommand (   self)

Definition at line 847 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().

847  def completeInputCommand(self):
848  if self._options.inputEventContent:
849  import copy
850  def dropSecondDropStar(iec):
851  #drop occurence of 'drop *' in the list
852  count=0
853  for item in iec:
854  if item=='drop *':
855  if count!=0:
856  iec.remove(item)
857  count+=1
858 
859 
860  if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring()
861  for evct in self._options.inputEventContent.split(','):
862  if evct=='': continue
863  theEventContent = getattr(self.process, evct+"EventContent")
864  if hasattr(theEventContent,'outputCommands'):
865  self.process.source.inputCommands.extend(copy.copy(theEventContent.outputCommands))
866  if hasattr(theEventContent,'inputCommands'):
867  self.process.source.inputCommands.extend(copy.copy(theEventContent.inputCommands))
868 
869  dropSecondDropStar(self.process.source.inputCommands)
870 
871  if not self._options.dropDescendant:
872  self.process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool(False)
873 
874 
875  return
876 

◆ create_process()

def ConfigBuilder.ConfigBuilder.create_process (   self)

Definition at line 2228 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.pythonCfgCode.

Referenced by ConfigBuilder.ConfigBuilder.build_production_info().

2228  def create_process(self):
2229  self.pythonCfgCode = "# Auto generated configuration file\n"
2230  self.pythonCfgCode += "# using: \n# "+__version__[1:-1]+"\n# "+__source__[1:-1]+'\n'
2231  self.pythonCfgCode += "# with command line options: "+self._options.arguments+'\n'
2232  self.pythonCfgCode += "import FWCore.ParameterSet.Config as cms\n\n"
2233 
2234  # now set up the modifies
2235  modifiers=[]
2236  modifierStrings=[]
2237  modifierImports=[]
2238 
2239  if hasattr(self._options,"era") and self._options.era :
2240  # Multiple eras can be specified in a comma seperated list
2241  from Configuration.StandardSequences.Eras import eras
2242  for requestedEra in self._options.era.split(",") :
2243  modifierStrings.append(requestedEra)
2244  modifierImports.append(eras.pythonCfgLines[requestedEra])
2245  modifiers.append(getattr(eras,requestedEra))
2246 
2247 
2248  if hasattr(self._options,"procModifiers") and self._options.procModifiers:
2249  import importlib
2250  thingsImported=[]
2251  for c in self._options.procModifiers:
2252  thingsImported.extend(c.split(","))
2253  for pm in thingsImported:
2254  modifierStrings.append(pm)
2255  modifierImports.append('from Configuration.ProcessModifiers.'+pm+'_cff import '+pm)
2256  modifiers.append(getattr(importlib.import_module('Configuration.ProcessModifiers.'+pm+'_cff'),pm))
2257 
2258  self.pythonCfgCode += '\n'.join(modifierImports)+'\n\n'
2259  self.pythonCfgCode += "process = cms.Process('"+self._options.name+"'" # Start of the line, finished after the loop
2260 
2261 
2262  if len(modifierStrings)>0:
2263  self.pythonCfgCode+= ','+','.join(modifierStrings)
2264  self.pythonCfgCode+=')\n\n'
2265 
2266  #yes, the cfg code gets out of sync here if a process is passed in. That could be fixed in the future
2267  #assuming there is some way for the fwk to get the list of modifiers (and their stringified name)
2268  if self.process == None:
2269  if len(modifiers)>0:
2270  self.process = cms.Process(self._options.name,*modifiers)
2271  else:
2272  self.process = cms.Process(self._options.name)
2273 
2274 
2275 
2276 
static std::string join(char **cmd)
Definition: RemoteFile.cc:21

◆ define_Configs()

def ConfigBuilder.ConfigBuilder.define_Configs (   self)

Definition at line 980 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.addCustomiseCmdLine().

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

◆ executeAndRemember()

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

Definition at line 357 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().

357  def executeAndRemember(self, command):
358  """helper routine to remember replace statements"""
359  self.additionalCommands.append(command)
360  if not command.strip().startswith("#"):
361  # substitute: process.foo = process.bar -> self.process.foo = self.process.bar
362  import re
363  exec(re.sub(r"([^a-zA-Z_0-9]|^)(process)([^a-zA-Z_0-9])",r"\1self.process\3",command))
364  #exec(command.replace("process.","self.process."))
365 

◆ expandMapping()

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

Definition at line 2069 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().

2069  def expandMapping(self,seqList,mapping,index=None):
2070  maxLevel=30
2071  level=0
2072  while '@' in repr(seqList) and level<maxLevel:
2073  level+=1
2074  for specifiedCommand in seqList:
2075  if specifiedCommand.startswith('@'):
2076  location=specifiedCommand[1:]
2077  if not location in mapping:
2078  raise Exception("Impossible to map "+location+" from "+repr(mapping))
2079  mappedTo=mapping[location]
2080  if index!=None:
2081  mappedTo=mappedTo[index]
2082  seqList.remove(specifiedCommand)
2083  seqList.extend(mappedTo.split('+'))
2084  break;
2085  if level==maxLevel:
2086  raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
2087 

◆ finalizeFastSimHLT()

def ConfigBuilder.ConfigBuilder.finalizeFastSimHLT (   self)

Definition at line 2212 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().

2212  def finalizeFastSimHLT(self):
2213  self.process.reconstruction = cms.Path(self.process.reconstructionWithFamos)
2214  self.schedule.append(self.process.reconstruction)
2215 
2216 

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

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

323  def heapProfileOptions(self):
324  """
325  addJeProfService
326  Function to add the jemalloc heap profile service so that you can dump in the middle
327  of the run.
328  """
329  profileOpts = []
330  profilerStart = 1
331  profilerInterval = 100
332  profilerFormat = "jeprof_%s.heap"
333  profilerJobFormat = None
334 
335 
336  if not profilerJobFormat and profilerFormat.endswith(".heap"):
337  profilerJobFormat = profilerFormat.replace(".heap", "_EndOfJob.heap")
338  elif not profilerJobFormat:
339  profilerJobFormat = profilerFormat + "_EndOfJob.heap"
340 
341  return (profilerStart,profilerInterval,profilerFormat,profilerJobFormat)
342 

◆ load()

◆ loadAndRemember()

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

Definition at line 348 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.loadPhase2GTMenu(), 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_L1P2GT(), ConfigBuilder.ConfigBuilder.prepare_L1REPACK(), ConfigBuilder.ConfigBuilder.prepare_NANO(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), ConfigBuilder.ConfigBuilder.prepare_POSTRECO(), and ConfigBuilder.ConfigBuilder.prepare_SIM().

348  def loadAndRemember(self, includeFile):
349  """helper routine to load am memorize imports"""
350  # we could make the imports a on-the-fly data method of the process instance itself
351  # not sure if the latter is a good idea
352  includeFile = includeFile.replace('/','.')
353  self.imports.append(includeFile)
354  self.process.load(includeFile)
355  return sys.modules[includeFile]
356 
def load(fileName)
Definition: svgfig.py:547

◆ loadDefaultOrSpecifiedCFF()

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

Definition at line 1260 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_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().

1260  def loadDefaultOrSpecifiedCFF(self, stepSpec, defaultCFF, defaultSEQ=''):
1261  _dotsplit = stepSpec.split('.')
1262  if ( len(_dotsplit)==1 ):
1263  if '/' in _dotsplit[0]:
1264  _sequence = defaultSEQ if defaultSEQ else stepSpec
1265  _cff = _dotsplit[0]
1266  else:
1267  _sequence = stepSpec
1268  _cff = defaultCFF
1269  elif ( len(_dotsplit)==2 ):
1270  _cff,_sequence = _dotsplit
1271  else:
1272  print("sub sequence configuration must be of the form dir/subdir/cff.a+b+c or cff.a")
1273  print(stepSpec,"not recognized")
1274  raise
1275  l=self.loadAndRemember(_cff)
1276  return l,_sequence,_cff
1277 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ loadPhase2GTMenu()

def ConfigBuilder.ConfigBuilder.loadPhase2GTMenu (   self,
  menuFile 
)

Definition at line 1559 of file ConfigBuilder.py.

References DeadROC_duringRun.dir, ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.prepare_L1P2GT(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, and ConfigBuilder.ConfigBuilder.schedule.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1P2GT(), and ConfigBuilder.ConfigBuilder.prepare_REPACK().

1559  def loadPhase2GTMenu(self, menuFile: str):
1560  import importlib
1561  menuPath = f'L1Trigger.Configuration.Phase2GTMenus.{menuFile}'
1562  menuModule = importlib.import_module(menuPath)
1563 
1564  theMenu = menuModule.menu
1565  triggerPaths = [] #we get a list of paths in each of these files to schedule
1566 
1567  for triggerPathFile in theMenu:
1568  self.loadAndRemember(triggerPathFile) #this load and remember will set the algo variable of the algoblock later
1569 
1570  triggerPathModule = importlib.import_module(triggerPathFile)
1571  for objName in dir(triggerPathModule):
1572  obj = getattr(triggerPathModule, objName)
1573  objType = type(obj)
1574  if objType == cms.Path:
1575  triggerPaths.append(objName)
1576 
1577  triggerScheduleList = [getattr(self.process, name) for name in triggerPaths] #get the actual paths to put in the schedule
1578  self.schedule.extend(triggerScheduleList) #put them in the schedule for later
1579 

◆ prepare()

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

Definition at line 2277 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.

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

1317  def prepare_ALCA(self, stepSpec = None, workflow = 'full'):
1318  """ Enrich the process with alca streams """
1319  alcaConfig,sequence,_=self.loadDefaultOrSpecifiedCFF(stepSpec,self.ALCADefaultCFF)
1320 
1321  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
1322  # decide which ALCA paths to use
1323  alcaList = sequence.split("+")
1324  for alca in alcaList:
1325  if (len(alca)>MAXLEN):
1326  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)+")!")
1327 
1328  maxLevel=0
1329  from Configuration.AlCa.autoAlca import autoAlca, AlCaNoConcurrentLumis
1330  # support @X from autoAlca.py, and recursion support: i.e T0:@Mu+@EG+...
1331  self.expandMapping(alcaList,autoAlca)
1332  self.AlCaPaths=[]
1333  for name in alcaConfig.__dict__:
1334  alcastream = getattr(alcaConfig,name)
1335  shortName = name.replace('ALCARECOStream','')
1336  if shortName in alcaList and isinstance(alcastream,cms.FilteredStream):
1337  if shortName in AlCaNoConcurrentLumis:
1338  print("Setting numberOfConcurrentLuminosityBlocks=1 because of AlCa sequence {}".format(shortName))
1339  self._options.nConcurrentLumis = 1
1340  self._options.nConcurrentIOVs = 1
1341  output = self.addExtraStream(name,alcastream, workflow = workflow)
1342  self.executeAndRemember('process.ALCARECOEventContent.outputCommands.extend(process.OutALCARECO'+shortName+'_noDrop.outputCommands)')
1343  self.AlCaPaths.append(shortName)
1344  if 'DQM' in alcaList:
1345  if not self._options.inlineEventContent and hasattr(self.process,name):
1346  self.executeAndRemember('process.' + name + '.outputCommands.append("keep *_MEtoEDMConverter_*_*")')
1347  else:
1348  output.outputCommands.append("keep *_MEtoEDMConverter_*_*")
1349 
1350  #rename the HLT process name in the alca modules
1351  if self._options.hltProcess or 'HLT' in self.stepMap:
1352  if isinstance(alcastream.paths,tuple):
1353  for path in alcastream.paths:
1354  self.renameHLTprocessInSequence(path.label())
1355  else:
1356  self.renameHLTprocessInSequence(alcastream.paths.label())
1357 
1358  for i in range(alcaList.count(shortName)):
1359  alcaList.remove(shortName)
1360 
1361  # DQM needs a special handling
1362  elif name == 'pathALCARECODQM' and 'DQM' in alcaList:
1363  path = getattr(alcaConfig,name)
1364  self.schedule.append(path)
1365  alcaList.remove('DQM')
1366 
1367  if isinstance(alcastream,cms.Path):
1368  #black list the alca path so that they do not appear in the cfg
1369  self.blacklist_paths.append(alcastream)
1370 
1371 
1372  if len(alcaList) != 0:
1373  available=[]
1374  for name in alcaConfig.__dict__:
1375  alcastream = getattr(alcaConfig,name)
1376  if isinstance(alcastream,cms.FilteredStream):
1377  available.append(name.replace('ALCARECOStream',''))
1378  print("The following alcas could not be found "+str(alcaList))
1379  print("available ",available)
1380  #print "verify your configuration, ignoring for now"
1381  raise Exception("The following alcas could not be found "+str(alcaList))
1382 
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 2172 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.

2172  def prepare_ALCAHARVEST(self, stepSpec = None):
2173  """ Enrich the process with AlCaHarvesting step """
2174  harvestingConfig = self.loadAndRemember(self.ALCAHARVESTDefaultCFF)
2175  sequence=stepSpec.split(".")[-1]
2176 
2177  # decide which AlcaHARVESTING paths to use
2178  harvestingList = sequence.split("+")
2179 
2180 
2181 
2182  from Configuration.AlCa.autoPCL import autoPCL
2183  self.expandMapping(harvestingList,autoPCL)
2184 
2185  for name in harvestingConfig.__dict__:
2186  harvestingstream = getattr(harvestingConfig,name)
2187  if name in harvestingList and isinstance(harvestingstream,cms.Path):
2188  self.schedule.append(harvestingstream)
2189  if isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_dbOutput"), cms.VPSet) and \
2190  isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_metadata"), cms.VPSet):
2191  self.executeAndRemember("process.PoolDBOutputService.toPut.extend(process.ALCAHARVEST" + name + "_dbOutput)")
2192  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.extend(process.ALCAHARVEST" + name + "_metadata)")
2193  else:
2194  self.executeAndRemember("process.PoolDBOutputService.toPut.append(process.ALCAHARVEST" + name + "_dbOutput)")
2195  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVEST" + name + "_metadata)")
2196  harvestingList.remove(name)
2197  # append the common part at the end of the sequence
2198  lastStep = getattr(harvestingConfig,"ALCAHARVESTDQMSaveAndMetadataWriter")
2199  self.schedule.append(lastStep)
2200 
2201  if len(harvestingList) != 0 and 'dummyHarvesting' not in harvestingList :
2202  print("The following harvesting could not be found : ", harvestingList)
2203  raise Exception("The following harvesting could not be found : "+str(harvestingList))
2204 
2205 
2206 
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 1314 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.prepare_ALCA().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER().

1314  def prepare_ALCAOUTPUT(self, stepSpec = None):
1315  self.prepare_ALCA(stepSpec, workflow = "output")
1316 

◆ prepare_ALCAPRODUCER()

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

Definition at line 1311 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

1311  def prepare_ALCAPRODUCER(self, stepSpec = None):
1312  self.prepare_ALCA(stepSpec, workflow = "producers")
1313 

◆ prepare_CFWRITER()

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

Definition at line 1525 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().

1525  def prepare_CFWRITER(self, stepSpec = None):
1526  """ Enrich the schedule with the crossing frame writer step"""
1527  self.loadAndRemember(self.CFWRITERDefaultCFF)
1528  self.scheduleSequence('pcfw','cfwriter_step')
1529  return
1530 

◆ prepare_DATAMIX()

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

Definition at line 1531 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().

1531  def prepare_DATAMIX(self, stepSpec = None):
1532  """ Enrich the schedule with the digitisation step"""
1533  self.loadAndRemember(self.DATAMIXDefaultCFF)
1534  self.scheduleSequence('pdatamix','datamixing_step')
1535 
1536  if self._options.pileup_input:
1537  theFiles=''
1538  if self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:'):
1539  theFiles=filesFromDASQuery('file dataset = %s'%(self._options.pileup_input[4:],),self._options.pileup_dasoption)[0]
1540  elif self._options.pileup_input.startswith("filelist:"):
1541  theFiles= (filesFromList(self._options.pileup_input[9:]))[0]
1542  else:
1543  theFiles=self._options.pileup_input.split(',')
1544  #print theFiles
1545  self.executeAndRemember( "process.mixData.input.fileNames = cms.untracked.vstring(%s)"%( theFiles ) )
1546 
1547  return
1548 
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 1505 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().

1505  def prepare_DIGI(self, stepSpec = None):
1506  """ Enrich the schedule with the digitisation step"""
1507  _,_digiSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DIGIDefaultCFF)
1508 
1509  if self._options.gflash==True:
1510  self.loadAndRemember("Configuration/StandardSequences/GFlashDIGI_cff")
1511 
1512  if _digiSeq == 'pdigi_valid' or _digiSeq == 'pdigi_hi':
1513  self.executeAndRemember("process.mix.digitizers = cms.PSet(process.theDigitizersValid)")
1514 
1515  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":
1516  if self._options.inputEventContent=='':
1517  self._options.inputEventContent='REGEN'
1518  else:
1519  self._options.inputEventContent=self._options.inputEventContent+',REGEN'
1520 
1521 
1522  self.scheduleSequence(_digiSeq,'digitisation_step')
1523  return
1524 

◆ prepare_DIGI2RAW()

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

Definition at line 1549 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().

1549  def prepare_DIGI2RAW(self, stepSpec = None):
1550  _,_digi2rawSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DIGI2RAWDefaultCFF)
1551  self.scheduleSequence(_digi2rawSeq,'digi2raw_step')
1552  return
1553 

◆ prepare_DQM()

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

Definition at line 2088 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().

2088  def prepare_DQM(self, stepSpec = 'DQMOffline'):
2089  # this one needs replacement
2090 
2091  # any 'DQM' job should use DQMStore in non-legacy mode (but not HARVESTING)
2092  self.loadAndRemember("DQMServices/Core/DQMStoreNonLegacy_cff")
2093  _,_dqmSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DQMOFFLINEDefaultCFF)
2094  sequenceList=_dqmSeq.split('+')
2095  postSequenceList=_dqmSeq.split('+')
2096  from DQMOffline.Configuration.autoDQM import autoDQM
2097  self.expandMapping(sequenceList,autoDQM,index=0)
2098  self.expandMapping(postSequenceList,autoDQM,index=1)
2099 
2100  if len(set(sequenceList))!=len(sequenceList):
2101  sequenceList=list(OrderedSet(sequenceList))
2102  print("Duplicate entries for DQM:, using",sequenceList)
2103 
2104  pathName='dqmoffline_step'
2105  for (i,_sequence) in enumerate(sequenceList):
2106  if (i!=0):
2107  pathName='dqmoffline_%d_step'%(i)
2108 
2109  if 'HLT' in self.stepMap.keys() or self._options.hltProcess:
2110  self.renameHLTprocessInSequence(_sequence)
2111 
2112  setattr(self.process,pathName, cms.EndPath( getattr(self.process,_sequence ) ) )
2113  self.schedule.append(getattr(self.process,pathName))
2114 
2115  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
2116  #will get in the schedule, smoothly
2117  getattr(self.process,pathName).insert(0,self.process.genstepfilter)
2118 
2119 
2120  pathName='dqmofflineOnPAT_step'
2121  for (i,_sequence) in enumerate(postSequenceList):
2122  #Fix needed to avoid duplication of sequences not defined in autoDQM or without a PostDQM
2123  if (sequenceList[i]==postSequenceList[i]):
2124  continue
2125  if (i!=0):
2126  pathName='dqmofflineOnPAT_%d_step'%(i)
2127 
2128  setattr(self.process,pathName, cms.EndPath( getattr(self.process, _sequence ) ) )
2129  self.schedule.append(getattr(self.process,pathName))
2130 
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 2207 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

2207  def prepare_ENDJOB(self, stepSpec = 'endOfProcess'):
2208  _,_endjobSeq,_=self.loadDefaultOrSpecifiedCFF(stepSpec,self.ENDJOBDefaultCFF)
2209  self.scheduleSequenceAtEnd(_endjobSeq,'endjob_step')
2210  return
2211 

◆ prepare_FILTER()

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

Definition at line 1709 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 default_text_conditions_cfi.object.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1TrackTrigger().

1709  def prepare_FILTER(self, stepSpec = None):
1710  ''' Enrich the schedule with a user defined filter sequence '''
1711 
1712  filterConfig,filterSeq = stepSpec.split('.')
1713  filterConfig=self.load(filterConfig)
1714 
1715  class PrintAllModules(object):
1716  def __init__(self):
1717  self.inliner=''
1718  pass
1719  def enter(self,visitee):
1720  try:
1721  label=visitee.label()
1722 
1723  self.inliner=label+','+self.inliner
1724  except:
1725  pass
1726  def leave(self,v): pass
1727 
1728  expander=PrintAllModules()
1729  getattr(self.process,filterSeq).visit( expander )
1730  self._options.inlineObjects+=','+expander.inliner
1731  self._options.inlineObjects+=','+filterSeq
1732 
1733 
1734  self.scheduleSequence(filterSeq,'filtering_step')
1735  self.nextScheduleIsConditional=True
1736 
1737  self.productionFilterSequence = filterSeq
1738 
1739  return
1740 
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 1400 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.

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

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

2131  def prepare_HARVESTING(self, stepSpec = None):
2132  """ Enrich the process with harvesting step """
2133  self.DQMSaverCFF='Configuration/StandardSequences/DQMSaver'+self._options.harvesting+'_cff'
2134  self.loadAndRemember(self.DQMSaverCFF)
2135 
2136  harvestingConfig,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.HARVESTINGDefaultCFF)
2137 
2138  # decide which HARVESTING paths to use
2139  harvestingList = sequence.split("+")
2140  from DQMOffline.Configuration.autoDQM import autoDQM
2141  from Validation.Configuration.autoValidation import autoValidation
2142  import copy
2143  combined_mapping = copy.deepcopy( autoDQM )
2144  combined_mapping.update( autoValidation )
2145  self.expandMapping(harvestingList,combined_mapping,index=-1)
2146 
2147  if len(set(harvestingList))!=len(harvestingList):
2148  harvestingList=list(OrderedSet(harvestingList))
2149  print("Duplicate entries for HARVESTING, using",harvestingList)
2150 
2151  for name in harvestingList:
2152  if not name in harvestingConfig.__dict__:
2153  print(name,"is not a possible harvesting type. Available are",harvestingConfig.__dict__.keys())
2154  # trigger hard error, like for other sequence types
2155  getattr(self.process, name)
2156  continue
2157  harvestingstream = getattr(harvestingConfig,name)
2158  if isinstance(harvestingstream,cms.Path):
2159  self.schedule.append(harvestingstream)
2160  self.blacklist_paths.append(harvestingstream)
2161  if isinstance(harvestingstream,cms.Sequence):
2162  setattr(self.process,name+"_step",cms.Path(harvestingstream))
2163  self.schedule.append(getattr(self.process,name+"_step"))
2164 
2165  # # NOTE: the "hltProcess" option currently does nothing in the HARVEST step
2166  # if self._options.hltProcess or ('HLT' in self.stepMap):
2167  # pass
2168 
2169  self.scheduleSequence('DQMSaver','dqmsave_step')
2170  return
2171 
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 1612 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().

1612  def prepare_HLT(self, stepSpec = None):
1613  """ Enrich the schedule with the HLT simulation step"""
1614  if not stepSpec:
1615  print("no specification of the hlt menu has been given, should never happen")
1616  raise Exception('no HLT specifications provided')
1617 
1618  if '@' in stepSpec:
1619  # case where HLT:@something was provided
1620  from Configuration.HLT.autoHLT import autoHLT
1621  key = stepSpec[1:]
1622  if key in autoHLT:
1623  stepSpec = autoHLT[key]
1624  else:
1625  raise ValueError('no HLT mapping key "%s" found in autoHLT' % key)
1626 
1627  if ',' in stepSpec:
1628  #case where HLT:something:something was provided
1629  self.executeAndRemember('import HLTrigger.Configuration.Utilities')
1630  optionsForHLT = {}
1631  if self._options.scenario == 'HeavyIons':
1632  optionsForHLT['type'] = 'HIon'
1633  else:
1634  optionsForHLT['type'] = 'GRun'
1635  optionsForHLTConfig = ', '.join('%s=%s' % (key, repr(val)) for (key, val) in optionsForHLT.items())
1636  if stepSpec == 'run,fromSource':
1637  if hasattr(self.process.source,'firstRun'):
1638  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.firstRun.value()),%s)'%(optionsForHLTConfig))
1639  elif hasattr(self.process.source,'setRunNumber'):
1640  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.setRunNumber.value()),%s)'%(optionsForHLTConfig))
1641  else:
1642  raise Exception(f'Cannot replace menu to load {stepSpec}')
1643  else:
1644  self.executeAndRemember('process.loadHltConfiguration("%s",%s)'%(stepSpec.replace(',',':'),optionsForHLTConfig))
1645  else:
1646  self.loadAndRemember('HLTrigger/Configuration/HLT_%s_cff' % stepSpec)
1647 
1648  if self._options.isMC:
1649  self._options.customisation_file.append("HLTrigger/Configuration/customizeHLTforMC.customizeHLTforMC")
1650 
1651  if self._options.name != 'HLT':
1652  self.additionalCommands.append('from HLTrigger.Configuration.CustomConfigs import ProcessName')
1653  self.additionalCommands.append('process = ProcessName(process)')
1654  self.additionalCommands.append('')
1655  from HLTrigger.Configuration.CustomConfigs import ProcessName
1656  self.process = ProcessName(self.process)
1657 
1658  if self.process.schedule == None:
1659  raise Exception('the HLT step did not attach a valid schedule to the process')
1660 
1661  self.scheduleIndexOfFirstHLTPath = len(self.schedule)
1662  [self.blacklist_paths.append(path) for path in self.process.schedule if isinstance(path,(cms.Path,cms.EndPath))]
1663 
1664  # this is a fake, to be removed with fastim migration and HLT menu dump
1665  if self._options.fast:
1666  if not hasattr(self.process,'HLTEndSequence'):
1667  self.executeAndRemember("process.HLTEndSequence = cms.Sequence( process.dummyModule )")
1668 
1669 
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:21

◆ prepare_L1()

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

Definition at line 1593 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_L1P2GT().

1593  def prepare_L1(self, stepSpec = None):
1594  """ Enrich the schedule with the L1 simulation step"""
1595  assert(stepSpec == None)
1596  self.loadAndRemember(self.L1EMDefaultCFF)
1597  self.scheduleSequence('SimL1Emulator','L1simulation_step')
1598  return
1599 
assert(be >=bs)

◆ prepare_L1HwVal()

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

Definition at line 1691 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATFILTER().

1691  def prepare_L1HwVal(self, stepSpec = 'L1HwVal'):
1692  ''' Enrich the schedule with L1 HW validation '''
1693  self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1HwValDefaultCFF)
1694  print('\n\n\n DEPRECATED this has no action \n\n\n')
1695  return
1696 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ prepare_L1P2GT()

def ConfigBuilder.ConfigBuilder.prepare_L1P2GT (   self,
  stepSpec = None 
)
Run the GT emulation sequence on top of the L1 emulation step 

Definition at line 1582 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.L1P2GTDefaultCFF, ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.loadPhase2GTMenu(), ConfigBuilder.ConfigBuilder.prepare_L1(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

Referenced by ConfigBuilder.ConfigBuilder.loadPhase2GTMenu().

1582  def prepare_L1P2GT(self, stepSpec=None):
1583  """ Run the GT emulation sequence on top of the L1 emulation step """
1584  self.loadAndRemember(self.L1P2GTDefaultCFF)
1585  self.scheduleSequence('l1tGTProducerSequence', 'Phase2L1GTProducer')
1586  self.scheduleSequence('l1tGTAlgoBlockProducerSequence', 'Phase2L1GTAlgoBlockProducer')
1587  if stepSpec == None:
1588  defaultMenuFile = "prototype_2023_v1_0_0"
1589  self.loadPhase2GTMenu(menuFile = defaultMenuFile)
1590  else:
1591  self.loadPhase2GTMenu(menuFile = stepSpec)
1592 

◆ prepare_L1Reco()

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

Definition at line 1697 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().

1697  def prepare_L1Reco(self, stepSpec = "L1Reco"):
1698  ''' Enrich the schedule with L1 reconstruction '''
1699  _,_l1recoSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1RecoDefaultCFF)
1700  self.scheduleSequence(_l1recoSeq,'L1Reco_step')
1701  return
1702 

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

1600  def prepare_L1REPACK(self, stepSpec = None):
1601  """ 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"""
1602  supported = ['GT','GT1','GT2','GCTGT','Full','FullSimTP','FullMC','Full2015Data','uGT','CalouGT']
1603  if stepSpec in supported:
1604  self.loadAndRemember('Configuration/StandardSequences/SimL1EmulatorRepack_%s_cff'% stepSpec)
1605  if self._options.scenario == 'HeavyIons':
1606  self.renameInputTagsInSequence("SimL1Emulator","rawDataCollector","rawDataRepacker")
1607  self.scheduleSequence('SimL1Emulator','L1RePack_step')
1608  else:
1609  print("L1REPACK with '",stepSpec,"' is not supported! Supported choices are: ",supported)
1610  raise Exception('unsupported feature')
1611 
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 1703 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().

1703  def prepare_L1TrackTrigger(self, stepSpec = "L1TrackTrigger"):
1704  ''' Enrich the schedule with L1 reconstruction '''
1705  _,_l1tracktriggerSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1TrackTriggerDefaultCFF)
1706  self.scheduleSequence(_l1tracktriggerSeq,'L1TrackTrigger_step')
1707  return
1708 

◆ prepare_LHE()

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

Definition at line 1383 of file ConfigBuilder.py.

1383  def prepare_LHE(self, stepSpec = None):
1384  #load the fragment
1385 
1386  loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','').replace('/','.')
1387  print("Loading lhe fragment from",loadFragment)
1388  __import__(loadFragment)
1389  self.process.load(loadFragment)
1390 
1391  self._options.inlineObjects+=','+stepSpec
1392 
1393  getattr(self.process,stepSpec).nEvents = self._options.number
1394 
1395  #schedule it
1396  self.process.lhe_step = cms.Path( getattr( self.process,stepSpec) )
1397  self.excludedPaths.append("lhe_step")
1398  self.schedule.append( self.process.lhe_step )
1399 
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 1794 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

1794  def prepare_NANO(self, stepSpec = '' ):
1795  print(f"in prepare_nano {stepSpec}")
1796  ''' Enrich the schedule with NANO '''
1797  if not '@' in stepSpec:
1798  _,_nanoSeq,_nanoCff = self.loadDefaultOrSpecifiedCFF(stepSpec,self.NANODefaultCFF,self.NANODefaultSeq)
1799  else:
1800  _nanoSeq = stepSpec
1801  _nanoCff = self.NANODefaultCFF
1802 
1803  print(_nanoSeq)
1804  # create full specified sequence using autoNANO
1805  from PhysicsTools.NanoAOD.autoNANO import autoNANO, expandNanoMapping
1806  # if not a autoNANO mapping, load an empty customization, which later will be converted into the default.
1807  _nanoCustoms = _nanoSeq.split('+') if '@' in stepSpec else ['']
1808  _nanoSeq = _nanoSeq.split('+')
1809  expandNanoMapping(_nanoSeq, autoNANO, 'sequence')
1810  expandNanoMapping(_nanoCustoms, autoNANO, 'customize')
1811  # make sure there are no duplicates while preserving the ordering
1812  _nanoSeq = list(sorted(set(_nanoSeq), key=_nanoSeq.index))
1813  _nanoCustoms = list(sorted(set(_nanoCustoms), key=_nanoCustoms.index))
1814  # replace empty sequence with default
1815  _nanoSeq = [seq if seq!='' else f"{self.NANODefaultCFF}.{self.NANODefaultSeq}" for seq in _nanoSeq]
1816  _nanoCustoms = [cust if cust!='' else self.NANODefaultCustom for cust in _nanoCustoms]
1817  # build and inject the sequence
1818  if len(_nanoSeq) < 1 and '@' in stepSpec:
1819  raise Exception(f'The specified mapping: {stepSpec} generates an empty NANO sequence. Please provide a valid mapping')
1820  _seqToSchedule = []
1821  for _subSeq in _nanoSeq:
1822  if '.' in _subSeq:
1823  _cff,_seq = _subSeq.split('.')
1824  print("NANO: scheduling:",_seq,"from",_cff)
1825  self.loadAndRemember(_cff)
1826  _seqToSchedule.append(_seq)
1827  elif '/' in _subSeq:
1828  self.loadAndRemember(_subSeq)
1829  _seqToSchedule.append(self.NANODefaultSeq)
1830  else:
1831  print("NANO: scheduling:",_subSeq)
1832  _seqToSchedule.append(_subSeq)
1833  self.scheduleSequence('+'.join(_seqToSchedule), 'nanoAOD_step')
1834 
1835  # add the customisations
1836  for custom in _nanoCustoms:
1837  custom_path = custom if '.' in custom else '.'.join([_nanoCff,custom])
1838  # customization order can be important for NANO, here later specified customise take precedence
1839  self._options.customisation_file.append(custom_path)
1840  if self._options.hltProcess:
1841  if len(self._options.customise_commands) > 1:
1842  self._options.customise_commands = self._options.customise_commands + " \n"
1843  self._options.customise_commands = self._options.customise_commands + "process.unpackedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1844 
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:21

◆ prepare_PAT()

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

Definition at line 1762 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().

1762  def prepare_PAT(self, stepSpec = "miniAOD"):
1763  ''' Enrich the schedule with PAT '''
1764  self.prepare_PATFILTER(self)
1765  self.loadDefaultOrSpecifiedCFF(stepSpec,self.PATDefaultCFF)
1766  self.labelsToAssociate.append('patTask')
1767  if self._options.isData:
1768  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllData")
1769  else:
1770  if self._options.fast:
1771  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMCFastSim")
1772  else:
1773  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMC")
1774 
1775  if self._options.hltProcess:
1776  if len(self._options.customise_commands) > 1:
1777  self._options.customise_commands = self._options.customise_commands + " \n"
1778  self._options.customise_commands = self._options.customise_commands + "process.patTrigger.processName = \""+self._options.hltProcess+"\"\n"
1779  self._options.customise_commands = self._options.customise_commands + "process.slimmedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1780  self._options.customise_commands = self._options.customise_commands + "process.patMuons.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1781 
1782 # self.renameHLTprocessInSequence(sequence)
1783 
1784  return
1785 

◆ prepare_PATFILTER()

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

Definition at line 1685 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().

1685  def prepare_PATFILTER(self, stepSpec = None):
1686  self.loadAndRemember("PhysicsTools/PatAlgos/slimming/metFilterPaths_cff")
1687  from PhysicsTools.PatAlgos.slimming.metFilterPaths_cff import allMetFilterPaths
1688  for filt in allMetFilterPaths:
1689  self.schedule.append(getattr(self.process,'Flag_'+filt))
1690 

◆ prepare_PATGEN()

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

Definition at line 1786 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().

1786  def prepare_PATGEN(self, stepSpec = "miniGEN"):
1787  ''' Enrich the schedule with PATGEN '''
1788  self.loadDefaultOrSpecifiedCFF(stepSpec,self.PATGENDefaultCFF) #this is unscheduled
1789  self.labelsToAssociate.append('patGENTask')
1790  if self._options.isData:
1791  raise Exception("PATGEN step can only run on MC")
1792  return
1793 

◆ prepare_POSTRECO()

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

Definition at line 1906 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().

1906  def prepare_POSTRECO(self, stepSpec = None):
1907  """ Enrich the schedule with the postreco step """
1908  self.loadAndRemember(self.POSTRECODefaultCFF)
1909  self.scheduleSequence('postreco_generator','postreco_step')
1910  return
1911 
1912 

◆ prepare_RAW2DIGI()

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

Definition at line 1680 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().

1680  def prepare_RAW2DIGI(self, stepSpec = "RawToDigi"):
1681  _,_raw2digiSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RAW2DIGIDefaultCFF)
1682  self.scheduleSequence(_raw2digiSeq,'raw2digi_step')
1683  return
1684 

◆ prepare_RAW2RECO()

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

Definition at line 1670 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_HLT().

1670  def prepare_RAW2RECO(self, stepSpec = None):
1671  if ','in stepSpec:
1672  seqReco,seqDigi=stepSpec.spli(',')
1673  else:
1674  print(f"RAW2RECO requires two specifications {stepSpec} insufficient")
1675 
1676  self.prepare_RAW2DIGI(seqDigi)
1677  self.prepare_RECO(seqReco)
1678  return
1679 
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 1741 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().

1741  def prepare_RECO(self, stepSpec = "reconstruction"):
1742  ''' Enrich the schedule with reconstruction '''
1743  _,_recoSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RECODefaultCFF)
1744  self.scheduleSequence(_recoSeq,'reconstruction_step')
1745  return
1746 

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

1753  def prepare_RECOBEFMIX(self, stepSpec = "reconstruction"):
1754  ''' Enrich the schedule with the part of reconstruction that is done before mixing in FastSim'''
1755  if not self._options.fast:
1756  print("ERROR: this step is only implemented for FastSim")
1757  sys.exit()
1758  _,_recobefmixSeq,_ = self.loadDefaultOrSpecifiedCFF(self.RECOBEFMIXDefaultSeq,self.RECOBEFMIXDefaultCFF)
1759  self.scheduleSequence(_recobefmixSeq,'reconstruction_befmix_step')
1760  return
1761 
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 1747 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().

1747  def prepare_RECOSIM(self, stepSpec = "recosim"):
1748  ''' Enrich the schedule with reconstruction '''
1749  _,_recosimSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RECOSIMDefaultCFF)
1750  self.scheduleSequence(_recosimSeq,'recosim_step')
1751  return
1752 

◆ prepare_REPACK()

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

Definition at line 1554 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

1554  def prepare_REPACK(self, stepSpec = None):
1555  _,_repackSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.REPACKDefaultCFF)
1556  self.scheduleSequence(_repackSeq,'digi2repack_step')
1557  return
1558 

◆ prepare_SIM()

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

Definition at line 1489 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().

1489  def prepare_SIM(self, stepSpec = None):
1490  """ Enrich the schedule with the simulation step"""
1491  _,_simSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.SIMDefaultCFF)
1492  if not self._options.fast:
1493  if self._options.gflash==True:
1494  self.loadAndRemember("Configuration/StandardSequences/GFlashSIM_cff")
1495 
1496  if self._options.magField=='0T':
1497  self.executeAndRemember("process.g4SimHits.UseMagneticField = cms.bool(False)")
1498  else:
1499  if self._options.magField=='0T':
1500  self.executeAndRemember("process.fastSimProducer.detectorDefinition.magneticFieldZ = cms.untracked.double(0.)")
1501 
1502  self.scheduleSequence(_simSeq,'simulation_step')
1503  return
1504 

◆ prepare_SKIM()

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

Definition at line 1845 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, isotrackApplyRegressor.range, ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.SKIMDefaultCFF, and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

1845  def prepare_SKIM(self, stepSpec = "all"):
1846  ''' Enrich the schedule with skimming fragments'''
1847  skimConfig,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.SKIMDefaultCFF)
1848 
1849  stdHLTProcName = 'HLT'
1850  newHLTProcName = self._options.hltProcess
1851  customiseForReHLT = (newHLTProcName or (stdHLTProcName in self.stepMap)) and (newHLTProcName != stdHLTProcName)
1852  if customiseForReHLT:
1853  print("replacing %s process name - step SKIM:%s will use '%s'" % (stdHLTProcName, sequence, newHLTProcName))
1854 
1855 
1856  from Configuration.Skimming.autoSkim import autoSkim
1857  skimlist = sequence.split('+')
1858  self.expandMapping(skimlist,autoSkim)
1859 
1860  #print("dictionary for skims:", skimConfig.__dict__)
1861  for skim in skimConfig.__dict__:
1862  skimstream = getattr(skimConfig, skim)
1863 
1864  # blacklist AlCa paths so that they do not appear in the cfg
1865  if isinstance(skimstream, cms.Path):
1866  self.blacklist_paths.append(skimstream)
1867  # if enabled, apply "hltProcess" renaming to Sequences
1868  elif isinstance(skimstream, cms.Sequence):
1869  if customiseForReHLT:
1870  self.renameHLTprocessInSequence(skim, proc = newHLTProcName, HLTprocess = stdHLTProcName, verbosityLevel = 0)
1871 
1872  if not isinstance(skimstream, cms.FilteredStream):
1873  continue
1874 
1875  shortname = skim.replace('SKIMStream','')
1876  if (sequence=="all"):
1877  self.addExtraStream(skim,skimstream)
1878  elif (shortname in skimlist):
1879  self.addExtraStream(skim,skimstream)
1880  #add a DQM eventcontent for this guy
1881  if self._options.datatier=='DQM':
1882  self.process.load(self.EVTCONTDefaultCFF)
1883  skimstreamDQM = cms.FilteredStream(
1884  responsible = skimstream.responsible,
1885  name = skimstream.name+'DQM',
1886  paths = skimstream.paths,
1887  selectEvents = skimstream.selectEvents,
1888  content = self._options.datatier+'EventContent',
1889  dataTier = cms.untracked.string(self._options.datatier)
1890  )
1891  self.addExtraStream(skim+'DQM',skimstreamDQM)
1892  for i in range(skimlist.count(shortname)):
1893  skimlist.remove(shortname)
1894 
1895  if (skimlist.__len__()!=0 and sequence!="all"):
1896  print('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1897  raise Exception('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1898 
1899 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
static std::string join(char **cmd)
Definition: RemoteFile.cc:21
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 1900 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().

1900  def prepare_USER(self, stepSpec = None):
1901  ''' Enrich the schedule with a user defined sequence '''
1902  _,_userSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.USERDefaultCFF)
1903  self.scheduleSequence(_userSeq,'user_step')
1904  return
1905 

◆ prepare_VALIDATION()

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

Definition at line 1913 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, default_text_conditions_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().

1913  def prepare_VALIDATION(self, stepSpec = 'validation'):
1914  print(f"{stepSpec} in preparing validation")
1915  _,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.VALIDATIONDefaultCFF)
1916  from Validation.Configuration.autoValidation import autoValidation
1917  #in case VALIDATION:something:somethingelse -> something,somethingelse
1918  if sequence.find(',')!=-1:
1919  prevalSeqName=sequence.split(',')[0].split('+')
1920  valSeqName=sequence.split(',')[1].split('+')
1921  self.expandMapping(prevalSeqName,autoValidation,index=0)
1922  self.expandMapping(valSeqName,autoValidation,index=1)
1923  else:
1924  if '@' in sequence:
1925  prevalSeqName=sequence.split('+')
1926  valSeqName=sequence.split('+')
1927  self.expandMapping(prevalSeqName,autoValidation,index=0)
1928  self.expandMapping(valSeqName,autoValidation,index=1)
1929  else:
1930  postfix=''
1931  if sequence:
1932  postfix='_'+sequence
1933  prevalSeqName=['prevalidation'+postfix]
1934  valSeqName=['validation'+postfix]
1935  if not hasattr(self.process,valSeqName[0]):
1936  prevalSeqName=['']
1937  valSeqName=[sequence]
1938 
1939  def NFI(index):
1940 
1941  if index==0:
1942  return ''
1943  else:
1944  return '%s'%index
1945 
1946 
1947  #rename the HLT process in validation steps
1948  if ('HLT' in self.stepMap and not self._options.fast) or self._options.hltProcess:
1949  for s in valSeqName+prevalSeqName:
1950  if s:
1951  self.renameHLTprocessInSequence(s)
1952  for (i,s) in enumerate(prevalSeqName):
1953  if s:
1954  setattr(self.process,'prevalidation_step%s'%NFI(i), cms.Path( getattr(self.process, s)) )
1955  self.schedule.append(getattr(self.process,'prevalidation_step%s'%NFI(i)))
1956 
1957  for (i,s) in enumerate(valSeqName):
1958  setattr(self.process,'validation_step%s'%NFI(i), cms.EndPath( getattr(self.process, s)))
1959  self.schedule.append(getattr(self.process,'validation_step%s'%NFI(i)))
1960 
1961  #needed in case the miniAODValidation sequence is run starting from AODSIM
1962  if 'PAT' in self.stepMap and not 'RECO' in self.stepMap:
1963  return
1964 
1965  if not 'DIGI' in self.stepMap and not self._options.fast and not any(map( lambda s : s.startswith('genvalid'), valSeqName)):
1966  if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True:
1967  self._options.restoreRNDSeeds=True
1968 
1969  if not 'DIGI' in self.stepMap and not self._options.isData and not self._options.fast:
1970  self.executeAndRemember("process.mix.playback = True")
1971  self.executeAndRemember("process.mix.digitizers = cms.PSet()")
1972  self.executeAndRemember("for a in process.aliases: delattr(process, a)")
1973  self._options.customisation_file.append("SimGeneral/MixingModule/fullMixCustomize_cff.setCrossingFrameOn")
1974 
1975  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
1976  #will get in the schedule, smoothly
1977  for (i,s) in enumerate(valSeqName):
1978  getattr(self.process,'validation_step%s'%NFI(i)).insert(0, self.process.genstepfilter)
1979 
1980  return
1981 
1982 
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 279 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

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

◆ renameHLTprocessInSequence()

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

Definition at line 2052 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().

2052  def renameHLTprocessInSequence(self, sequence, proc=None, HLTprocess='HLT', verbosityLevel=1):
2053  if proc == None:
2054  proc = self._options.hltProcess if self._options.hltProcess else self.process.name_()
2055  if proc == HLTprocess:
2056  return
2057  # look up all module in sequence
2058  if verbosityLevel > 0:
2059  print("replacing %s process name - sequence %s will use '%s'" % (HLTprocess, sequence, proc))
2060  verboseVisit = (verbosityLevel > 1)
2061  getattr(self.process,sequence).visit(
2062  ConfigBuilder.MassSearchReplaceProcessNameVisitor(HLTprocess, proc, whitelist = ("subSystemFolder",), verbose = verboseVisit))
2063  if 'from Configuration.Applications.ConfigBuilder import ConfigBuilder' not in self.additionalCommands:
2064  self.additionalCommands.append('from Configuration.Applications.ConfigBuilder import ConfigBuilder')
2065  self.additionalCommands.append(
2066  'process.%s.visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor("%s", "%s", whitelist = ("subSystemFolder",), verbose = %s))'
2067  % (sequence, HLTprocess, proc, verboseVisit))
2068 
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 2042 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().

2042  def renameInputTagsInSequence(self,sequence,oldT="rawDataCollector",newT="rawDataRepacker"):
2043  print("Replacing all InputTag %s => %s"%(oldT,newT))
2044  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
2045  massSearchReplaceAnyInputTag(getattr(self.process,sequence),oldT,newT)
2046  loadMe='from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag'
2047  if not loadMe in self.additionalCommands:
2048  self.additionalCommands.append(loadMe)
2049  self.additionalCommands.append('massSearchReplaceAnyInputTag(process.%s,"%s","%s",False,True)'%(sequence,oldT,newT))
2050 
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 1278 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_L1P2GT(), ConfigBuilder.ConfigBuilder.prepare_L1Reco(), ConfigBuilder.ConfigBuilder.prepare_L1REPACK(), ConfigBuilder.ConfigBuilder.prepare_L1TrackTrigger(), ConfigBuilder.ConfigBuilder.prepare_NANO(), 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().

1278  def scheduleSequence(self,seq,prefix,what='Path'):
1279  if '*' in seq:
1280  #create only one path with all sequences in it
1281  for i,s in enumerate(seq.split('*')):
1282  if i==0:
1283  setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, s) ))
1284  else:
1285  p=getattr(self.process,prefix)
1286  tmp = getattr(self.process, s)
1287  if isinstance(tmp, cms.Task):
1288  p.associate(tmp)
1289  else:
1290  p+=tmp
1291  self.schedule.append(getattr(self.process,prefix))
1292  return
1293  else:
1294  #create as many path as many sequences
1295  if not '+' in seq:
1296  if self.nextScheduleIsConditional:
1297  self.conditionalPaths.append(prefix)
1298  setattr(self.process,prefix,getattr(cms,what)( getattr(self.process, seq) ))
1299  self.schedule.append(getattr(self.process,prefix))
1300  else:
1301  for i,s in enumerate(seq.split('+')):
1302  sn=prefix+'%d'%(i)
1303  setattr(self.process,sn,getattr(cms,what)( getattr(self.process, s) ))
1304  self.schedule.append(getattr(self.process,sn))
1305  return
1306 

◆ scheduleSequenceAtEnd()

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

Definition at line 1307 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().

1307  def scheduleSequenceAtEnd(self,seq,prefix):
1308  self.scheduleSequence(seq,prefix,what='EndPath')
1309  return
1310 

Member Data Documentation

◆ _options

◆ addedObjects

◆ additionalCommands

◆ additionalOutputs

ConfigBuilder.ConfigBuilder.additionalOutputs

Definition at line 271 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ ALCADefaultCFF

ConfigBuilder.ConfigBuilder.ALCADefaultCFF

◆ ALCADefaultSeq

ConfigBuilder.ConfigBuilder.ALCADefaultSeq

Definition at line 1028 of file ConfigBuilder.py.

◆ ALCAHARVESTDefaultCFF

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultCFF

Definition at line 1016 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

◆ ALCAHARVESTDefaultSeq

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultSeq

Definition at line 1040 of file ConfigBuilder.py.

◆ AlCaPaths

ConfigBuilder.ConfigBuilder.AlCaPaths

◆ blacklist_paths

ConfigBuilder.ConfigBuilder.blacklist_paths

◆ CFWRITERDefaultCFF

ConfigBuilder.ConfigBuilder.CFWRITERDefaultCFF

Definition at line 1019 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_CFWRITER().

◆ CFWRITERDefaultSeq

ConfigBuilder.ConfigBuilder.CFWRITERDefaultSeq

Definition at line 1041 of file ConfigBuilder.py.

◆ conditionalPaths

ConfigBuilder.ConfigBuilder.conditionalPaths

◆ ConditionsDefaultCFF

ConfigBuilder.ConfigBuilder.ConditionsDefaultCFF

Definition at line 1018 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addConditions().

◆ DATAMIXDefaultCFF

ConfigBuilder.ConfigBuilder.DATAMIXDefaultCFF

Definition at line 1023 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DATAMIX().

◆ DATAMIXDefaultSeq

ConfigBuilder.ConfigBuilder.DATAMIXDefaultSeq

Definition at line 1033 of file ConfigBuilder.py.

◆ DIGI2RAWDefaultCFF

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultCFF

Definition at line 997 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

◆ DIGI2RAWDefaultSeq

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultSeq

Definition at line 1034 of file ConfigBuilder.py.

◆ DIGIDefaultCFF

ConfigBuilder.ConfigBuilder.DIGIDefaultCFF

Definition at line 996 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI().

◆ DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.DIGIDefaultSeq

Definition at line 1032 of file ConfigBuilder.py.

◆ DQMDefaultSeq

ConfigBuilder.ConfigBuilder.DQMDefaultSeq

Definition at line 1052 of file ConfigBuilder.py.

◆ DQMOFFLINEDefaultCFF

ConfigBuilder.ConfigBuilder.DQMOFFLINEDefaultCFF

Definition at line 1014 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

◆ DQMSaverCFF

ConfigBuilder.ConfigBuilder.DQMSaverCFF

Definition at line 2133 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_HARVESTING().

◆ ENDJOBDefaultCFF

ConfigBuilder.ConfigBuilder.ENDJOBDefaultCFF

Definition at line 1017 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ENDJOB().

◆ ENDJOBDefaultSeq

ConfigBuilder.ConfigBuilder.ENDJOBDefaultSeq

Definition at line 1054 of file ConfigBuilder.py.

◆ EVTCONTDefaultCFF

ConfigBuilder.ConfigBuilder.EVTCONTDefaultCFF

◆ excludedPaths

ConfigBuilder.ConfigBuilder.excludedPaths

Definition at line 277 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ GENDefaultCFF

ConfigBuilder.ConfigBuilder.GENDefaultCFF

Definition at line 994 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GENDefaultSeq

ConfigBuilder.ConfigBuilder.GENDefaultSeq

Definition at line 1030 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GeometryCFF

ConfigBuilder.ConfigBuilder.GeometryCFF

Definition at line 1125 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ geometryDBLabel

ConfigBuilder.ConfigBuilder.geometryDBLabel

Definition at line 1126 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ HARVESTINGDefaultCFF

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultCFF

Definition at line 1015 of file ConfigBuilder.py.

◆ HARVESTINGDefaultSeq

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultSeq

Definition at line 1039 of file ConfigBuilder.py.

◆ HLTDefaultCFF

ConfigBuilder.ConfigBuilder.HLTDefaultCFF

Definition at line 1001 of file ConfigBuilder.py.

◆ HLTDefaultSeq

ConfigBuilder.ConfigBuilder.HLTDefaultSeq

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

◆ L1DefaultSeq

ConfigBuilder.ConfigBuilder.L1DefaultSeq

Definition at line 1036 of file ConfigBuilder.py.

◆ L1EMDefaultCFF

ConfigBuilder.ConfigBuilder.L1EMDefaultCFF

Definition at line 998 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1().

◆ L1HwValDefaultCFF

ConfigBuilder.ConfigBuilder.L1HwValDefaultCFF

Definition at line 1013 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1HwVal().

◆ L1HwValDefaultSeq

ConfigBuilder.ConfigBuilder.L1HwValDefaultSeq

Definition at line 1051 of file ConfigBuilder.py.

◆ L1MENUDefaultCFF

ConfigBuilder.ConfigBuilder.L1MENUDefaultCFF

Definition at line 1000 of file ConfigBuilder.py.

◆ L1P2GTDefaultCFF

ConfigBuilder.ConfigBuilder.L1P2GTDefaultCFF

Definition at line 999 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1P2GT().

◆ L1P2GTDefaultSeq

ConfigBuilder.ConfigBuilder.L1P2GTDefaultSeq

Definition at line 1037 of file ConfigBuilder.py.

◆ L1RecoDefaultCFF

ConfigBuilder.ConfigBuilder.L1RecoDefaultCFF

Definition at line 1004 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1Reco().

◆ L1RecoDefaultSeq

ConfigBuilder.ConfigBuilder.L1RecoDefaultSeq

Definition at line 1043 of file ConfigBuilder.py.

◆ L1REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.L1REPACKDefaultSeq

Definition at line 1038 of file ConfigBuilder.py.

◆ L1TrackTriggerDefaultCFF

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultCFF

◆ L1TrackTriggerDefaultSeq

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultSeq

Definition at line 1044 of file ConfigBuilder.py.

◆ labelsToAssociate

ConfigBuilder.ConfigBuilder.labelsToAssociate

◆ LHEDefaultSeq

ConfigBuilder.ConfigBuilder.LHEDefaultSeq

Definition at line 1029 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ magFieldCFF

ConfigBuilder.ConfigBuilder.magFieldCFF

Definition at line 1121 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ NANODefaultCFF

ConfigBuilder.ConfigBuilder.NANODefaultCFF

Definition at line 1009 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultCustom

ConfigBuilder.ConfigBuilder.NANODefaultCustom

Definition at line 1060 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultSeq

ConfigBuilder.ConfigBuilder.NANODefaultSeq

Definition at line 1059 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ nextScheduleIsConditional

ConfigBuilder.ConfigBuilder.nextScheduleIsConditional

put the filtering path in the schedule

Definition at line 275 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequence().

◆ PATDefaultCFF

ConfigBuilder.ConfigBuilder.PATDefaultCFF

Definition at line 1008 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PAT().

◆ PATDefaultSeq

ConfigBuilder.ConfigBuilder.PATDefaultSeq

Definition at line 1056 of file ConfigBuilder.py.

◆ PATGENDefaultCFF

ConfigBuilder.ConfigBuilder.PATGENDefaultCFF

Definition at line 1072 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

◆ PATGENDefaultSeq

ConfigBuilder.ConfigBuilder.PATGENDefaultSeq

Definition at line 1057 of file ConfigBuilder.py.

◆ POSTRECODefaultCFF

ConfigBuilder.ConfigBuilder.POSTRECODefaultCFF

Definition at line 1011 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_POSTRECO().

◆ POSTRECODefaultSeq

ConfigBuilder.ConfigBuilder.POSTRECODefaultSeq

Definition at line 1050 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 252 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(), runTauIdMVA.TauIDEmbedder.load_againstElectronMVA6(), ConfigBuilder.ConfigBuilder.loadAndRemember(), runTauIdMVA.TauIDEmbedder.loadMVA_WPs_run2_2017(), ConfigBuilder.ConfigBuilder.loadPhase2GTMenu(), 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 273 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 1002 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI().

◆ RAW2DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.RAW2DIGIDefaultSeq

Definition at line 1042 of file ConfigBuilder.py.

◆ RAW2RECODefaultSeq

ConfigBuilder.ConfigBuilder.RAW2RECODefaultSeq

Definition at line 1115 of file ConfigBuilder.py.

◆ RECOBEFMIXDefaultCFF

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultCFF

Definition at line 1176 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECOBEFMIXDefaultSeq

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultSeq

Definition at line 1177 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECODefaultCFF

ConfigBuilder.ConfigBuilder.RECODefaultCFF

Definition at line 1006 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECO().

◆ RECODefaultSeq

ConfigBuilder.ConfigBuilder.RECODefaultSeq

Definition at line 1046 of file ConfigBuilder.py.

◆ RECOSIMDefaultCFF

ConfigBuilder.ConfigBuilder.RECOSIMDefaultCFF

Definition at line 1007 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOSIM().

◆ RECOSIMDefaultSeq

ConfigBuilder.ConfigBuilder.RECOSIMDefaultSeq

Definition at line 1049 of file ConfigBuilder.py.

◆ REDIGIDefaultSeq

ConfigBuilder.ConfigBuilder.REDIGIDefaultSeq

Definition at line 1192 of file ConfigBuilder.py.

◆ REPACKDefaultCFF

ConfigBuilder.ConfigBuilder.REPACKDefaultCFF

Definition at line 1020 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_REPACK().

◆ REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.REPACKDefaultSeq

Definition at line 1055 of file ConfigBuilder.py.

◆ runsAndWeights

ConfigBuilder.ConfigBuilder.runsAndWeights

drop LHEXMLStringProduct on input to save memory if appropriate

Definition at line 516 of file ConfigBuilder.py.

◆ runsAndWeightsInt

ConfigBuilder.ConfigBuilder.runsAndWeightsInt

Definition at line 537 of file ConfigBuilder.py.

◆ schedule

◆ scheduleIndexOfFirstHLTPath

ConfigBuilder.ConfigBuilder.scheduleIndexOfFirstHLTPath

◆ SIMDefaultCFF

ConfigBuilder.ConfigBuilder.SIMDefaultCFF

Definition at line 995 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SIM().

◆ SIMDefaultSeq

ConfigBuilder.ConfigBuilder.SIMDefaultSeq

Definition at line 1031 of file ConfigBuilder.py.

◆ SimGeometryCFF

ConfigBuilder.ConfigBuilder.SimGeometryCFF

Definition at line 1151 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ SKIMDefaultCFF

ConfigBuilder.ConfigBuilder.SKIMDefaultCFF

Definition at line 1010 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

◆ stepKeys

ConfigBuilder.ConfigBuilder.stepKeys

Definition at line 232 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ stepMap

◆ USERDefaultCFF

ConfigBuilder.ConfigBuilder.USERDefaultCFF

Definition at line 1118 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_USER().

◆ USERDefaultSeq

ConfigBuilder.ConfigBuilder.USERDefaultSeq

Definition at line 1117 of file ConfigBuilder.py.

◆ VALIDATIONDefaultCFF

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultCFF

Definition at line 1012 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

◆ VALIDATIONDefaultSeq

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultSeq

Definition at line 1053 of file ConfigBuilder.py.

◆ with_input

ConfigBuilder.ConfigBuilder.with_input

Definition at line 256 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ with_output

ConfigBuilder.ConfigBuilder.with_output

Definition at line 251 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().