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_NANOGEN (self, stepSpec="nanoAOD")
 
def prepare_PAT (self, stepSpec="miniAOD")
 
def prepare_PATFILTER (self, stepSpec=None)
 
def prepare_PATGEN (self, stepSpec="miniGEN")
 
def prepare_POSTRECO (self, stepSpec=None)
 
def prepare_RAW2DIGI (self, stepSpec="RawToDigi")
 
def prepare_RAW2RECO (self, stepSpec=None)
 
def prepare_RECO (self, stepSpec="reconstruction")
 
def prepare_RECOBEFMIX (self, stepSpec="reconstruction")
 
def prepare_RECOSIM (self, stepSpec="recosim")
 
def prepare_REPACK (self, stepSpec=None)
 
def prepare_SIM (self, stepSpec=None)
 
def prepare_SKIM (self, stepSpec="all")
 
def prepare_USER (self, stepSpec=None)
 
def prepare_VALIDATION (self, stepSpec='validation')
 
def profileOptions (self)
 
def renameHLTprocessInSequence (self, sequence, proc=None, HLTprocess='HLT', verbosityLevel=1)
 
def renameInputTagsInSequence (self, sequence, oldT="rawDataCollector", newT="rawDataRepacker")
 
def scheduleSequence (self, seq, prefix, what='Path')
 
def scheduleSequenceAtEnd (self, seq, prefix)
 

Public Attributes

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

Private Attributes

 _options
 

Detailed Description

The main building routines 

Definition at line 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:36
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:19

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

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

◆ 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:19
def addOutput(process)
Definition: FastTimer.py:47
def miniAOD_customizeOutput(out)

◆ addSource()

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

Definition at line 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:19
def load(fileName)
Definition: svgfig.py:547
def defineMixing(dict)
Definition: Mixing.py:207
def filesFromList(fileName, s=None)

◆ build_production_info()

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

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

2224  def build_production_info(self, evt_type, evtnumber):
2225  """ Add useful info for the production. """
2226  self.process.configurationMetadata=cms.untracked.PSet\
2227  (version=cms.untracked.string("$Revision: 1.19 $"),
2228  name=cms.untracked.string("Applications"),
2229  annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber))
2230  )
2231 
2232  self.addedObjects.append(("Production Info","configurationMetadata"))
2233 
2234 
#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 2235 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.pythonCfgCode.

Referenced by ConfigBuilder.ConfigBuilder.build_production_info().

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

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

◆ executeAndRemember()

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

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

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

◆ finalizeFastSimHLT()

def ConfigBuilder.ConfigBuilder.finalizeFastSimHLT (   self)

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

2219  def finalizeFastSimHLT(self):
2220  self.process.reconstruction = cms.Path(self.process.reconstructionWithFamos)
2221  self.schedule.append(self.process.reconstruction)
2222 
2223 

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

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

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

1262  def loadDefaultOrSpecifiedCFF(self, stepSpec, defaultCFF, defaultSEQ=''):
1263  _dotsplit = stepSpec.split('.')
1264  if ( len(_dotsplit)==1 ):
1265  if '/' in _dotsplit[0]:
1266  _sequence = defaultSEQ if defaultSEQ else stepSpec
1267  _cff = _dotsplit[0]
1268  else:
1269  _sequence = stepSpec
1270  _cff = defaultCFF
1271  elif ( len(_dotsplit)==2 ):
1272  _cff,_sequence = _dotsplit
1273  else:
1274  print("sub sequence configuration must be of the form dir/subdir/cff.a+b+c or cff.a")
1275  print(stepSpec,"not recognized")
1276  raise
1277  l=self.loadAndRemember(_cff)
1278  return l,_sequence,_cff
1279 
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 1561 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().

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

◆ prepare()

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

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

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

◆ prepare_ALCA()

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

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

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

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

References ConfigBuilder.ConfigBuilder.prepare_ALCA().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER().

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

◆ prepare_ALCAPRODUCER()

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

Definition at line 1313 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

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

◆ prepare_CFWRITER()

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

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

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

◆ prepare_DATAMIX()

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

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

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

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

◆ prepare_DIGI2RAW()

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

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

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

◆ prepare_DQM()

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

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

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

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

2214  def prepare_ENDJOB(self, stepSpec = 'endOfProcess'):
2215  _,_endjobSeq,_=self.loadDefaultOrSpecifiedCFF(stepSpec,self.ENDJOBDefaultCFF)
2216  self.scheduleSequenceAtEnd(_endjobSeq,'endjob_step')
2217  return
2218 

◆ prepare_FILTER()

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

Definition at line 1711 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1TrackTrigger().

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

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

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

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

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

◆ prepare_L1()

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

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

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

◆ prepare_L1HwVal()

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

Definition at line 1693 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATFILTER().

1693  def prepare_L1HwVal(self, stepSpec = 'L1HwVal'):
1694  ''' Enrich the schedule with L1 HW validation '''
1695  self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1HwValDefaultCFF)
1696  print('\n\n\n DEPRECATED this has no action \n\n\n')
1697  return
1698 
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 1584 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().

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

◆ prepare_L1Reco()

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

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

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

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

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

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

◆ prepare_LHE()

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

Definition at line 1385 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

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

◆ prepare_NANOGEN()

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

Definition at line 1840 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

1840  def prepare_NANOGEN(self, stepSpec = "nanoAOD"):
1841  ''' Enrich the schedule with NANOGEN '''
1842  # TODO: Need to modify this based on the input file type
1843  fromGen = any([x in self.stepMap for x in ['LHE', 'GEN', 'AOD']])
1844  _,_nanogenSeq,_nanogenCff = self.loadDefaultOrSpecifiedCFF(stepSpec,self.NANOGENDefaultCFF)
1845  self.scheduleSequence(_nanogenSeq,'nanoAOD_step')
1846  custom = "customizeNanoGEN" if fromGen else "customizeNanoGENFromMini"
1847  if self._options.runUnscheduled:
1848  self._options.customisation_file_unsch.insert(0, '.'.join([_nanogenCff, custom]))
1849  else:
1850  self._options.customisation_file.insert(0, '.'.join([_nanogenCff, custom]))
1851 
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:36
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ prepare_PAT()

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

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

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

◆ prepare_PATFILTER()

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

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

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

◆ prepare_PATGEN()

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

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

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

◆ prepare_POSTRECO()

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

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

1913  def prepare_POSTRECO(self, stepSpec = None):
1914  """ Enrich the schedule with the postreco step """
1915  self.loadAndRemember(self.POSTRECODefaultCFF)
1916  self.scheduleSequence('postreco_generator','postreco_step')
1917  return
1918 
1919 

◆ prepare_RAW2DIGI()

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

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

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

◆ prepare_RAW2RECO()

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

Definition at line 1672 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_HLT().

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

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

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

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

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

◆ prepare_REPACK()

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

Definition at line 1556 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

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

◆ prepare_SIM()

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

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

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

◆ prepare_SKIM()

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

Definition at line 1852 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANOGEN().

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

◆ prepare_USER()

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

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

1907  def prepare_USER(self, stepSpec = None):
1908  ''' Enrich the schedule with a user defined sequence '''
1909  _,_userSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.USERDefaultCFF)
1910  self.scheduleSequence(_userSeq,'user_step')
1911  return
1912 

◆ prepare_VALIDATION()

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

Definition at line 1920 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_POSTRECO().

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

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

2049  def renameInputTagsInSequence(self,sequence,oldT="rawDataCollector",newT="rawDataRepacker"):
2050  print("Replacing all InputTag %s => %s"%(oldT,newT))
2051  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
2052  massSearchReplaceAnyInputTag(getattr(self.process,sequence),oldT,newT)
2053  loadMe='from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag'
2054  if not loadMe in self.additionalCommands:
2055  self.additionalCommands.append(loadMe)
2056  self.additionalCommands.append('massSearchReplaceAnyInputTag(process.%s,"%s","%s",False,True)'%(sequence,oldT,newT))
2057 
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 1280 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_NANOGEN(), ConfigBuilder.ConfigBuilder.prepare_POSTRECO(), ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI(), ConfigBuilder.ConfigBuilder.prepare_RECO(), ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX(), ConfigBuilder.ConfigBuilder.prepare_RECOSIM(), ConfigBuilder.ConfigBuilder.prepare_REPACK(), ConfigBuilder.ConfigBuilder.prepare_SIM(), ConfigBuilder.ConfigBuilder.prepare_USER(), and ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

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

◆ scheduleSequenceAtEnd()

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

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

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

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

◆ ALCAHARVESTDefaultCFF

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultCFF

Definition at line 1017 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

◆ ALCAHARVESTDefaultSeq

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultSeq

Definition at line 1041 of file ConfigBuilder.py.

◆ AlCaPaths

ConfigBuilder.ConfigBuilder.AlCaPaths

◆ blacklist_paths

ConfigBuilder.ConfigBuilder.blacklist_paths

◆ CFWRITERDefaultCFF

ConfigBuilder.ConfigBuilder.CFWRITERDefaultCFF

Definition at line 1020 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_CFWRITER().

◆ CFWRITERDefaultSeq

ConfigBuilder.ConfigBuilder.CFWRITERDefaultSeq

Definition at line 1042 of file ConfigBuilder.py.

◆ conditionalPaths

ConfigBuilder.ConfigBuilder.conditionalPaths

◆ ConditionsDefaultCFF

ConfigBuilder.ConfigBuilder.ConditionsDefaultCFF

Definition at line 1019 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addConditions().

◆ DATAMIXDefaultCFF

ConfigBuilder.ConfigBuilder.DATAMIXDefaultCFF

Definition at line 1024 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DATAMIX().

◆ DATAMIXDefaultSeq

ConfigBuilder.ConfigBuilder.DATAMIXDefaultSeq

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

◆ DQMDefaultSeq

ConfigBuilder.ConfigBuilder.DQMDefaultSeq

Definition at line 1053 of file ConfigBuilder.py.

◆ DQMOFFLINEDefaultCFF

ConfigBuilder.ConfigBuilder.DQMOFFLINEDefaultCFF

Definition at line 1015 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

◆ DQMSaverCFF

ConfigBuilder.ConfigBuilder.DQMSaverCFF

Definition at line 2140 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_HARVESTING().

◆ ENDJOBDefaultCFF

ConfigBuilder.ConfigBuilder.ENDJOBDefaultCFF

Definition at line 1018 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ENDJOB().

◆ ENDJOBDefaultSeq

ConfigBuilder.ConfigBuilder.ENDJOBDefaultSeq

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GeometryCFF

ConfigBuilder.ConfigBuilder.GeometryCFF

Definition at line 1127 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ geometryDBLabel

ConfigBuilder.ConfigBuilder.geometryDBLabel

Definition at line 1128 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ HARVESTINGDefaultCFF

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultCFF

Definition at line 1016 of file ConfigBuilder.py.

◆ HARVESTINGDefaultSeq

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultSeq

Definition at line 1040 of file ConfigBuilder.py.

◆ HLTDefaultCFF

ConfigBuilder.ConfigBuilder.HLTDefaultCFF

Definition at line 1001 of file ConfigBuilder.py.

◆ HLTDefaultSeq

ConfigBuilder.ConfigBuilder.HLTDefaultSeq

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

◆ L1DefaultSeq

ConfigBuilder.ConfigBuilder.L1DefaultSeq

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1HwVal().

◆ L1HwValDefaultSeq

ConfigBuilder.ConfigBuilder.L1HwValDefaultSeq

Definition at line 1052 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 1038 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 1044 of file ConfigBuilder.py.

◆ L1REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.L1REPACKDefaultSeq

Definition at line 1039 of file ConfigBuilder.py.

◆ L1TrackTriggerDefaultCFF

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultCFF

◆ L1TrackTriggerDefaultSeq

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultSeq

Definition at line 1045 of file ConfigBuilder.py.

◆ labelsToAssociate

ConfigBuilder.ConfigBuilder.labelsToAssociate

◆ LHEDefaultSeq

ConfigBuilder.ConfigBuilder.LHEDefaultSeq

Definition at line 1030 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ magFieldCFF

ConfigBuilder.ConfigBuilder.magFieldCFF

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultSeq

ConfigBuilder.ConfigBuilder.NANODefaultSeq

Definition at line 1061 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANOGENDefaultCFF

ConfigBuilder.ConfigBuilder.NANOGENDefaultCFF

Definition at line 1010 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANOGEN().

◆ NANOGENDefaultSeq

ConfigBuilder.ConfigBuilder.NANOGENDefaultSeq

Definition at line 1060 of file ConfigBuilder.py.

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

◆ PATGENDefaultCFF

ConfigBuilder.ConfigBuilder.PATGENDefaultCFF

Definition at line 1074 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

◆ PATGENDefaultSeq

ConfigBuilder.ConfigBuilder.PATGENDefaultSeq

Definition at line 1058 of file ConfigBuilder.py.

◆ POSTRECODefaultCFF

ConfigBuilder.ConfigBuilder.POSTRECODefaultCFF

Definition at line 1012 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_POSTRECO().

◆ POSTRECODefaultSeq

ConfigBuilder.ConfigBuilder.POSTRECODefaultSeq

Definition at line 1051 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(), 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 1043 of file ConfigBuilder.py.

◆ RAW2RECODefaultSeq

ConfigBuilder.ConfigBuilder.RAW2RECODefaultSeq

Definition at line 1117 of file ConfigBuilder.py.

◆ RECOBEFMIXDefaultCFF

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultCFF

Definition at line 1178 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECOBEFMIXDefaultSeq

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultSeq

Definition at line 1179 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 1047 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 1050 of file ConfigBuilder.py.

◆ REDIGIDefaultSeq

ConfigBuilder.ConfigBuilder.REDIGIDefaultSeq

Definition at line 1194 of file ConfigBuilder.py.

◆ REPACKDefaultCFF

ConfigBuilder.ConfigBuilder.REPACKDefaultCFF

Definition at line 1021 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_REPACK().

◆ REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.REPACKDefaultSeq

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

◆ SimGeometryCFF

ConfigBuilder.ConfigBuilder.SimGeometryCFF

Definition at line 1153 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ SKIMDefaultCFF

ConfigBuilder.ConfigBuilder.SKIMDefaultCFF

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_USER().

◆ USERDefaultSeq

ConfigBuilder.ConfigBuilder.USERDefaultSeq

Definition at line 1119 of file ConfigBuilder.py.

◆ VALIDATIONDefaultCFF

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultCFF

Definition at line 1013 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

◆ VALIDATIONDefaultSeq

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultSeq

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