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

Constructor & Destructor Documentation

◆ __init__()

def ConfigBuilder.ConfigBuilder.__init__ (   self,
  options,
  process = None,
  with_output = False,
  with_input = False 
)
options taken from old cmsDriver and optparse 

Definition at line 202 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

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

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addedObjects, mps_setup.append, ConfigBuilder.ConfigBuilder.heapProfileOptions(), relativeConstraints.keys, DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.profileOptions(), and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

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

◆ addConditions()

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

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

899  def addConditions(self):
900  """Add conditions to the process"""
901  if not self._options.conditions: return
902 
903  if 'FrontierConditions_GlobalTag' in self._options.conditions:
904  print('using FrontierConditions_GlobalTag in --conditions is not necessary anymore and will be deprecated soon. please update your command line')
905  self._options.conditions = self._options.conditions.replace("FrontierConditions_GlobalTag,",'')
906 
907  self.loadAndRemember(self.ConditionsDefaultCFF)
908  from Configuration.AlCa.GlobalTag import GlobalTag
909  self.process.GlobalTag = GlobalTag(self.process.GlobalTag, self._options.conditions, self._options.custom_conditions)
910  self.additionalCommands.append('from Configuration.AlCa.GlobalTag import GlobalTag')
911  self.additionalCommands.append('process.GlobalTag = GlobalTag(process.GlobalTag, %s, %s)' % (repr(self._options.conditions), repr(self._options.custom_conditions)))
912 
913 
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 914 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().

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

987  def addCustomiseCmdLine(self):
988  final_snippet='\n# Customisation from command line\n'
989  if self._options.customise_commands:
990  import string
991  for com in self._options.customise_commands.split('\\n'):
992  com=com.lstrip()
993  self.executeAndRemember(com)
994  final_snippet +='\n'+com
995 
996  return final_snippet
997 

◆ addExtraStream()

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

Definition at line 1219 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

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

◆ addMaxEvents()

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

Definition at line 425 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare().

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

◆ addOutput()

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

Definition at line 584 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.AlCaPaths, ConfigBuilder.anyOf(), mps_setup.append, ConfigBuilder.ConfigBuilder.executeAndRemember(), join(), miniAOD_tools.miniAOD_customizeOutput(), print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, python.rootplot.root2matplotlib.replace(), ConfigBuilder.ConfigBuilder.schedule, submitPVValidationJobs.split(), and reco.zip().

Referenced by ConfigBuilder.ConfigBuilder.prepare().

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

References ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.addedObjects, mps_setup.append, ConfigBuilder.filesFromDASQuery(), ConfigBuilder.filesFromList(), createfilelist.int, relativeConstraints.keys, print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, submitPVValidationJobs.split(), and ConfigBuilder.ConfigBuilder.stepMap.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

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

◆ addStandardSequences()

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

Definition at line 766 of file ConfigBuilder.py.

References TriggerAnalyzer.__str__(), ConfigBuilder.ConfigBuilder._options, ConfigBuilder.ConfigBuilder.completeInputCommand(), Mixing.defineMixing(), ConfigBuilder.ConfigBuilder.executeAndRemember(), ConfigBuilder.filesFromDASQuery(), ConfigBuilder.filesFromList(), ConfigBuilder.ConfigBuilder.GeometryCFF, ConfigBuilder.ConfigBuilder.geometryDBLabel, join(), relativeConstraints.keys, ConfigBuilder.ConfigBuilder.load(), ConfigBuilder.ConfigBuilder.loadAndRemember(), ConfigBuilder.ConfigBuilder.magFieldCFF, print(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, ConfigBuilder.ConfigBuilder.process, ConfigBuilder.ConfigBuilder.SimGeometryCFF, ConfigBuilder.ConfigBuilder.stepKeys, and ConfigBuilder.ConfigBuilder.stepMap.

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

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

2246  def build_production_info(self, evt_type, evtnumber):
2247  """ Add useful info for the production. """
2248  self.process.configurationMetadata=cms.untracked.PSet\
2249  (version=cms.untracked.string("$Revision: 1.19 $"),
2250  name=cms.untracked.string("Applications"),
2251  annotation=cms.untracked.string(evt_type+ " nevts:"+str(evtnumber))
2252  )
2253 
2254  self.addedObjects.append(("Production Info","configurationMetadata"))
2255 
2256 
#define str(s)

◆ completeInputCommand()

def ConfigBuilder.ConfigBuilder.completeInputCommand (   self)

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

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

◆ create_process()

def ConfigBuilder.ConfigBuilder.create_process (   self)

Definition at line 2257 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.pythonCfgCode.

Referenced by ConfigBuilder.ConfigBuilder.build_production_info().

2257  def create_process(self):
2258  self.pythonCfgCode = "# Auto generated configuration file\n"
2259  self.pythonCfgCode += "# using: \n# "+__version__[1:-1]+"\n# "+__source__[1:-1]+'\n'
2260  self.pythonCfgCode += "# with command line options: "+self._options.arguments+'\n'
2261  self.pythonCfgCode += "import FWCore.ParameterSet.Config as cms\n\n"
2262 
2263  # now set up the modifies
2264  modifiers=[]
2265  modifierStrings=[]
2266  modifierImports=[]
2267 
2268  if hasattr(self._options,"era") and self._options.era :
2269  # Multiple eras can be specified in a comma seperated list
2270  from Configuration.StandardSequences.Eras import eras
2271  for requestedEra in self._options.era.split(",") :
2272  modifierStrings.append(requestedEra)
2273  modifierImports.append(eras.pythonCfgLines[requestedEra])
2274  modifiers.append(getattr(eras,requestedEra))
2275 
2276 
2277  if hasattr(self._options,"procModifiers") and self._options.procModifiers:
2278  import importlib
2279  thingsImported=[]
2280  for c in self._options.procModifiers:
2281  thingsImported.extend(c.split(","))
2282  for pm in thingsImported:
2283  modifierStrings.append(pm)
2284  modifierImports.append('from Configuration.ProcessModifiers.'+pm+'_cff import '+pm)
2285  modifiers.append(getattr(importlib.import_module('Configuration.ProcessModifiers.'+pm+'_cff'),pm))
2286 
2287  self.pythonCfgCode += '\n'.join(modifierImports)+'\n\n'
2288  self.pythonCfgCode += "process = cms.Process('"+self._options.name+"'" # Start of the line, finished after the loop
2289 
2290 
2291  if len(modifierStrings)>0:
2292  self.pythonCfgCode+= ','+','.join(modifierStrings)
2293  self.pythonCfgCode+=')\n\n'
2294 
2295  #yes, the cfg code gets out of sync here if a process is passed in. That could be fixed in the future
2296  #assuming there is some way for the fwk to get the list of modifiers (and their stringified name)
2297  if self.process == None:
2298  if len(modifiers)>0:
2299  self.process = cms.Process(self._options.name,*modifiers)
2300  else:
2301  self.process = cms.Process(self._options.name)
2302 
2303 
2304 
2305 
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ define_Configs()

def ConfigBuilder.ConfigBuilder.define_Configs (   self)

Definition at line 1002 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.addCustomiseCmdLine().

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

◆ executeAndRemember()

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

Definition at line 379 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.additionalCommands, and mps_setup.append.

Referenced by ConfigBuilder.ConfigBuilder.addCustomiseCmdLine(), ConfigBuilder.ConfigBuilder.addOutput(), ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST(), ConfigBuilder.ConfigBuilder.prepare_DATAMIX(), ConfigBuilder.ConfigBuilder.prepare_DIGI(), ConfigBuilder.ConfigBuilder.prepare_GEN(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_SIM(), and ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

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

◆ expandMapping()

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

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

2098  def expandMapping(self,seqList,mapping,index=None):
2099  maxLevel=30
2100  level=0
2101  while '@' in repr(seqList) and level<maxLevel:
2102  level+=1
2103  for specifiedCommand in seqList:
2104  if specifiedCommand.startswith('@'):
2105  location=specifiedCommand[1:]
2106  if not location in mapping:
2107  raise Exception("Impossible to map "+location+" from "+repr(mapping))
2108  mappedTo=mapping[location]
2109  if index!=None:
2110  mappedTo=mappedTo[index]
2111  seqList.remove(specifiedCommand)
2112  seqList.extend(mappedTo.split('+'))
2113  break;
2114  if level==maxLevel:
2115  raise Exception("Could not fully expand "+repr(seqList)+" from "+repr(mapping))
2116 

◆ finalizeFastSimHLT()

def ConfigBuilder.ConfigBuilder.finalizeFastSimHLT (   self)

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

2241  def finalizeFastSimHLT(self):
2242  self.process.reconstruction = cms.Path(self.process.reconstructionWithFamos)
2243  self.schedule.append(self.process.reconstruction)
2244 
2245 

◆ heapProfileOptions()

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

Definition at line 321 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

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

◆ load()

◆ loadAndRemember()

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

Definition at line 370 of file ConfigBuilder.py.

References mps_setup.append, ConfigBuilder.ConfigBuilder.imports, ConfigBuilder.ConfigBuilder.load(), DTT0WireWorkflow.DTT0WireWorkflow.process, DTVdriftWorkflow.DTvdriftWorkflow.process, DTTtrigWorkflow.DTttrigWorkflow.process, DTWorkflow.DTWorkflow.process, and ConfigBuilder.ConfigBuilder.process.

Referenced by ConfigBuilder.ConfigBuilder.addConditions(), ConfigBuilder.ConfigBuilder.addStandardSequences(), ConfigBuilder.ConfigBuilder.define_Configs(), ConfigBuilder.ConfigBuilder.loadDefaultOrSpecifiedCFF(), ConfigBuilder.ConfigBuilder.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().

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

◆ loadDefaultOrSpecifiedCFF()

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

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

1284  def loadDefaultOrSpecifiedCFF(self, stepSpec, defaultCFF, defaultSEQ=''):
1285  _dotsplit = stepSpec.split('.')
1286  if ( len(_dotsplit)==1 ):
1287  if '/' in _dotsplit[0]:
1288  _sequence = defaultSEQ if defaultSEQ else stepSpec
1289  _cff = _dotsplit[0]
1290  else:
1291  _sequence = stepSpec
1292  _cff = defaultCFF
1293  elif ( len(_dotsplit)==2 ):
1294  _cff,_sequence = _dotsplit
1295  else:
1296  print("sub sequence configuration must be of the form dir/subdir/cff.a+b+c or cff.a")
1297  print(stepSpec,"not recognized")
1298  raise
1299  l=self.loadAndRemember(_cff)
1300  return l,_sequence,_cff
1301 
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 1583 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().

1583  def loadPhase2GTMenu(self, menuFile: str):
1584  import importlib
1585  menuPath = f'L1Trigger.Configuration.Phase2GTMenus.{menuFile}'
1586  menuModule = importlib.import_module(menuPath)
1587 
1588  theMenu = menuModule.menu
1589  triggerPaths = [] #we get a list of paths in each of these files to schedule
1590 
1591  for triggerPathFile in theMenu:
1592  self.loadAndRemember(triggerPathFile) #this load and remember will set the algo variable of the algoblock later
1593 
1594  triggerPathModule = importlib.import_module(triggerPathFile)
1595  for objName in dir(triggerPathModule):
1596  obj = getattr(triggerPathModule, objName)
1597  objType = type(obj)
1598  if objType == cms.Path:
1599  triggerPaths.append(objName)
1600 
1601  triggerScheduleList = [getattr(self.process, name) for name in triggerPaths] #get the actual paths to put in the schedule
1602  self.schedule.extend(triggerScheduleList) #put them in the schedule for later
1603 

◆ prepare()

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

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

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

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

2201  def prepare_ALCAHARVEST(self, stepSpec = None):
2202  """ Enrich the process with AlCaHarvesting step """
2203  harvestingConfig = self.loadAndRemember(self.ALCAHARVESTDefaultCFF)
2204  sequence=stepSpec.split(".")[-1]
2205 
2206  # decide which AlcaHARVESTING paths to use
2207  harvestingList = sequence.split("+")
2208 
2209 
2210 
2211  from Configuration.AlCa.autoPCL import autoPCL
2212  self.expandMapping(harvestingList,autoPCL)
2213 
2214  for name in harvestingConfig.__dict__:
2215  harvestingstream = getattr(harvestingConfig,name)
2216  if name in harvestingList and isinstance(harvestingstream,cms.Path):
2217  self.schedule.append(harvestingstream)
2218  if isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_dbOutput"), cms.VPSet) and \
2219  isinstance(getattr(harvestingConfig,"ALCAHARVEST" + name + "_metadata"), cms.VPSet):
2220  self.executeAndRemember("process.PoolDBOutputService.toPut.extend(process.ALCAHARVEST" + name + "_dbOutput)")
2221  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.extend(process.ALCAHARVEST" + name + "_metadata)")
2222  else:
2223  self.executeAndRemember("process.PoolDBOutputService.toPut.append(process.ALCAHARVEST" + name + "_dbOutput)")
2224  self.executeAndRemember("process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVEST" + name + "_metadata)")
2225  harvestingList.remove(name)
2226  # append the common part at the end of the sequence
2227  lastStep = getattr(harvestingConfig,"ALCAHARVESTDQMSaveAndMetadataWriter")
2228  self.schedule.append(lastStep)
2229 
2230  if len(harvestingList) != 0 and 'dummyHarvesting' not in harvestingList :
2231  print("The following harvesting could not be found : ", harvestingList)
2232  raise Exception("The following harvesting could not be found : "+str(harvestingList))
2233 
2234 
2235 
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 1338 of file ConfigBuilder.py.

References ConfigBuilder.ConfigBuilder.prepare_ALCA().

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAPRODUCER().

1338  def prepare_ALCAOUTPUT(self, stepSpec = None):
1339  self.prepare_ALCA(stepSpec, workflow = "output")
1340 

◆ prepare_ALCAPRODUCER()

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

Definition at line 1335 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequenceAtEnd().

1335  def prepare_ALCAPRODUCER(self, stepSpec = None):
1336  self.prepare_ALCA(stepSpec, workflow = "producers")
1337 

◆ prepare_CFWRITER()

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

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

1549  def prepare_CFWRITER(self, stepSpec = None):
1550  """ Enrich the schedule with the crossing frame writer step"""
1551  self.loadAndRemember(self.CFWRITERDefaultCFF)
1552  self.scheduleSequence('pcfw','cfwriter_step')
1553  return
1554 

◆ prepare_DATAMIX()

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

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

1555  def prepare_DATAMIX(self, stepSpec = None):
1556  """ Enrich the schedule with the digitisation step"""
1557  self.loadAndRemember(self.DATAMIXDefaultCFF)
1558  self.scheduleSequence('pdatamix','datamixing_step')
1559 
1560  if self._options.pileup_input:
1561  theFiles=''
1562  if self._options.pileup_input.startswith('dbs:') or self._options.pileup_input.startswith('das:'):
1563  theFiles=filesFromDASQuery('file dataset = %s'%(self._options.pileup_input[4:],),self._options.pileup_dasoption)[0]
1564  elif self._options.pileup_input.startswith("filelist:"):
1565  theFiles= (filesFromList(self._options.pileup_input[9:]))[0]
1566  else:
1567  theFiles=self._options.pileup_input.split(',')
1568  #print theFiles
1569  self.executeAndRemember( "process.mixData.input.fileNames = cms.untracked.vstring(%s)"%( theFiles ) )
1570 
1571  return
1572 
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 1529 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().

1529  def prepare_DIGI(self, stepSpec = None):
1530  """ Enrich the schedule with the digitisation step"""
1531  _,_digiSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DIGIDefaultCFF)
1532 
1533  if self._options.gflash==True:
1534  self.loadAndRemember("Configuration/StandardSequences/GFlashDIGI_cff")
1535 
1536  if _digiSeq == 'pdigi_valid' or _digiSeq == 'pdigi_hi':
1537  self.executeAndRemember("process.mix.digitizers = cms.PSet(process.theDigitizersValid)")
1538 
1539  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":
1540  if self._options.inputEventContent=='':
1541  self._options.inputEventContent='REGEN'
1542  else:
1543  self._options.inputEventContent=self._options.inputEventContent+',REGEN'
1544 
1545 
1546  self.scheduleSequence(_digiSeq,'digitisation_step')
1547  return
1548 

◆ prepare_DIGI2RAW()

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

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

1573  def prepare_DIGI2RAW(self, stepSpec = None):
1574  _,_digi2rawSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DIGI2RAWDefaultCFF)
1575  self.scheduleSequence(_digi2rawSeq,'digi2raw_step')
1576  return
1577 

◆ prepare_DQM()

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

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

2117  def prepare_DQM(self, stepSpec = 'DQMOffline'):
2118  # this one needs replacement
2119 
2120  # any 'DQM' job should use DQMStore in non-legacy mode (but not HARVESTING)
2121  self.loadAndRemember("DQMServices/Core/DQMStoreNonLegacy_cff")
2122  _,_dqmSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.DQMOFFLINEDefaultCFF)
2123  sequenceList=_dqmSeq.split('+')
2124  postSequenceList=_dqmSeq.split('+')
2125  from DQMOffline.Configuration.autoDQM import autoDQM
2126  self.expandMapping(sequenceList,autoDQM,index=0)
2127  self.expandMapping(postSequenceList,autoDQM,index=1)
2128 
2129  if len(set(sequenceList))!=len(sequenceList):
2130  sequenceList=list(OrderedSet(sequenceList))
2131  print("Duplicate entries for DQM:, using",sequenceList)
2132 
2133  pathName='dqmoffline_step'
2134  for (i,_sequence) in enumerate(sequenceList):
2135  if (i!=0):
2136  pathName='dqmoffline_%d_step'%(i)
2137 
2138  if 'HLT' in self.stepMap.keys() or self._options.hltProcess:
2139  self.renameHLTprocessInSequence(_sequence)
2140 
2141  setattr(self.process,pathName, cms.EndPath( getattr(self.process,_sequence ) ) )
2142  self.schedule.append(getattr(self.process,pathName))
2143 
2144  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
2145  #will get in the schedule, smoothly
2146  getattr(self.process,pathName).insert(0,self.process.genstepfilter)
2147 
2148 
2149  pathName='dqmofflineOnPAT_step'
2150  for (i,_sequence) in enumerate(postSequenceList):
2151  #Fix needed to avoid duplication of sequences not defined in autoDQM or without a PostDQM
2152  if (sequenceList[i]==postSequenceList[i]):
2153  continue
2154  if (i!=0):
2155  pathName='dqmofflineOnPAT_%d_step'%(i)
2156 
2157  setattr(self.process,pathName, cms.EndPath( getattr(self.process, _sequence ) ) )
2158  self.schedule.append(getattr(self.process,pathName))
2159 
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 2236 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

2236  def prepare_ENDJOB(self, stepSpec = 'endOfProcess'):
2237  _,_endjobSeq,_=self.loadDefaultOrSpecifiedCFF(stepSpec,self.ENDJOBDefaultCFF)
2238  self.scheduleSequenceAtEnd(_endjobSeq,'endjob_step')
2239  return
2240 

◆ prepare_FILTER()

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

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

1733  def prepare_FILTER(self, stepSpec = None):
1734  ''' Enrich the schedule with a user defined filter sequence '''
1735 
1736  filterConfig,filterSeq = stepSpec.split('.')
1737  filterConfig=self.load(filterConfig)
1738 
1739  class PrintAllModules(object):
1740  def __init__(self):
1741  self.inliner=''
1742  pass
1743  def enter(self,visitee):
1744  try:
1745  label=visitee.label()
1746 
1747  self.inliner=label+','+self.inliner
1748  except:
1749  pass
1750  def leave(self,v): pass
1751 
1752  expander=PrintAllModules()
1753  getattr(self.process,filterSeq).visit( expander )
1754  self._options.inlineObjects+=','+expander.inliner
1755  self._options.inlineObjects+=','+filterSeq
1756 
1757 
1758  self.scheduleSequence(filterSeq,'filtering_step')
1759  self.nextScheduleIsConditional=True
1760 
1761  self.productionFilterSequence = filterSeq
1762 
1763  return
1764 
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 1424 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.

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

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

2160  def prepare_HARVESTING(self, stepSpec = None):
2161  """ Enrich the process with harvesting step """
2162  self.DQMSaverCFF='Configuration/StandardSequences/DQMSaver'+self._options.harvesting+'_cff'
2163  self.loadAndRemember(self.DQMSaverCFF)
2164 
2165  harvestingConfig,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.HARVESTINGDefaultCFF)
2166 
2167  # decide which HARVESTING paths to use
2168  harvestingList = sequence.split("+")
2169  from DQMOffline.Configuration.autoDQM import autoDQM
2170  from Validation.Configuration.autoValidation import autoValidation
2171  import copy
2172  combined_mapping = copy.deepcopy( autoDQM )
2173  combined_mapping.update( autoValidation )
2174  self.expandMapping(harvestingList,combined_mapping,index=-1)
2175 
2176  if len(set(harvestingList))!=len(harvestingList):
2177  harvestingList=list(OrderedSet(harvestingList))
2178  print("Duplicate entries for HARVESTING, using",harvestingList)
2179 
2180  for name in harvestingList:
2181  if not name in harvestingConfig.__dict__:
2182  print(name,"is not a possible harvesting type. Available are",harvestingConfig.__dict__.keys())
2183  # trigger hard error, like for other sequence types
2184  getattr(self.process, name)
2185  continue
2186  harvestingstream = getattr(harvestingConfig,name)
2187  if isinstance(harvestingstream,cms.Path):
2188  self.schedule.append(harvestingstream)
2189  self.blacklist_paths.append(harvestingstream)
2190  if isinstance(harvestingstream,cms.Sequence):
2191  setattr(self.process,name+"_step",cms.Path(harvestingstream))
2192  self.schedule.append(getattr(self.process,name+"_step"))
2193 
2194  # # NOTE: the "hltProcess" option currently does nothing in the HARVEST step
2195  # if self._options.hltProcess or ('HLT' in self.stepMap):
2196  # pass
2197 
2198  self.scheduleSequence('DQMSaver','dqmsave_step')
2199  return
2200 
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 1636 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().

1636  def prepare_HLT(self, stepSpec = None):
1637  """ Enrich the schedule with the HLT simulation step"""
1638  if not stepSpec:
1639  print("no specification of the hlt menu has been given, should never happen")
1640  raise Exception('no HLT specifications provided')
1641 
1642  if '@' in stepSpec:
1643  # case where HLT:@something was provided
1644  from Configuration.HLT.autoHLT import autoHLT
1645  key = stepSpec[1:]
1646  if key in autoHLT:
1647  stepSpec = autoHLT[key]
1648  else:
1649  raise ValueError('no HLT mapping key "%s" found in autoHLT' % key)
1650 
1651  if ',' in stepSpec:
1652  #case where HLT:something:something was provided
1653  self.executeAndRemember('import HLTrigger.Configuration.Utilities')
1654  optionsForHLT = {}
1655  if self._options.scenario == 'HeavyIons':
1656  optionsForHLT['type'] = 'HIon'
1657  else:
1658  optionsForHLT['type'] = 'GRun'
1659  optionsForHLTConfig = ', '.join('%s=%s' % (key, repr(val)) for (key, val) in optionsForHLT.items())
1660  if stepSpec == 'run,fromSource':
1661  if hasattr(self.process.source,'firstRun'):
1662  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.firstRun.value()),%s)'%(optionsForHLTConfig))
1663  elif hasattr(self.process.source,'setRunNumber'):
1664  self.executeAndRemember('process.loadHltConfiguration("run:%%d"%%(process.source.setRunNumber.value()),%s)'%(optionsForHLTConfig))
1665  else:
1666  raise Exception(f'Cannot replace menu to load {stepSpec}')
1667  else:
1668  self.executeAndRemember('process.loadHltConfiguration("%s",%s)'%(stepSpec.replace(',',':'),optionsForHLTConfig))
1669  else:
1670  self.loadAndRemember('HLTrigger/Configuration/HLT_%s_cff' % stepSpec)
1671 
1672  if self._options.isMC:
1673  self._options.customisation_file.append("HLTrigger/Configuration/customizeHLTforMC.customizeHLTforMC")
1674 
1675  if self._options.name != 'HLT':
1676  self.additionalCommands.append('from HLTrigger.Configuration.CustomConfigs import ProcessName')
1677  self.additionalCommands.append('process = ProcessName(process)')
1678  self.additionalCommands.append('')
1679  from HLTrigger.Configuration.CustomConfigs import ProcessName
1680  self.process = ProcessName(self.process)
1681 
1682  if self.process.schedule == None:
1683  raise Exception('the HLT step did not attach a valid schedule to the process')
1684 
1685  self.scheduleIndexOfFirstHLTPath = len(self.schedule)
1686  [self.blacklist_paths.append(path) for path in self.process.schedule if isinstance(path,(cms.Path,cms.EndPath))]
1687 
1688  # this is a fake, to be removed with fastim migration and HLT menu dump
1689  if self._options.fast:
1690  if not hasattr(self.process,'HLTEndSequence'):
1691  self.executeAndRemember("process.HLTEndSequence = cms.Sequence( process.dummyModule )")
1692 
1693 
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 1617 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().

1617  def prepare_L1(self, stepSpec = None):
1618  """ Enrich the schedule with the L1 simulation step"""
1619  assert(stepSpec == None)
1620  self.loadAndRemember(self.L1EMDefaultCFF)
1621  self.scheduleSequence('SimL1Emulator','L1simulation_step')
1622  return
1623 
assert(be >=bs)

◆ prepare_L1HwVal()

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

Definition at line 1715 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATFILTER().

1715  def prepare_L1HwVal(self, stepSpec = 'L1HwVal'):
1716  ''' Enrich the schedule with L1 HW validation '''
1717  self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1HwValDefaultCFF)
1718  print('\n\n\n DEPRECATED this has no action \n\n\n')
1719  return
1720 
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 1606 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().

1606  def prepare_L1P2GT(self, stepSpec=None):
1607  """ Run the GT emulation sequence on top of the L1 emulation step """
1608  self.loadAndRemember(self.L1P2GTDefaultCFF)
1609  self.scheduleSequence('l1tGTProducerSequence', 'Phase2L1GTProducer')
1610  self.scheduleSequence('l1tGTAlgoBlockProducerSequence', 'Phase2L1GTAlgoBlockProducer')
1611  if stepSpec == None:
1612  defaultMenuFile = "prototype_2023_v1_0_0"
1613  self.loadPhase2GTMenu(menuFile = defaultMenuFile)
1614  else:
1615  self.loadPhase2GTMenu(menuFile = stepSpec)
1616 

◆ prepare_L1Reco()

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

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

1721  def prepare_L1Reco(self, stepSpec = "L1Reco"):
1722  ''' Enrich the schedule with L1 reconstruction '''
1723  _,_l1recoSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1RecoDefaultCFF)
1724  self.scheduleSequence(_l1recoSeq,'L1Reco_step')
1725  return
1726 

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

1624  def prepare_L1REPACK(self, stepSpec = None):
1625  """ 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"""
1626  supported = ['GT','GT1','GT2','GCTGT','Full','FullSimTP','FullMC','Full2015Data','uGT','CalouGT']
1627  if stepSpec in supported:
1628  self.loadAndRemember('Configuration/StandardSequences/SimL1EmulatorRepack_%s_cff'% stepSpec)
1629  if self._options.scenario == 'HeavyIons':
1630  self.renameInputTagsInSequence("SimL1Emulator","rawDataCollector","rawDataRepacker")
1631  self.scheduleSequence('SimL1Emulator','L1RePack_step')
1632  else:
1633  print("L1REPACK with '",stepSpec,"' is not supported! Supported choices are: ",supported)
1634  raise Exception('unsupported feature')
1635 
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 1727 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().

1727  def prepare_L1TrackTrigger(self, stepSpec = "L1TrackTrigger"):
1728  ''' Enrich the schedule with L1 reconstruction '''
1729  _,_l1tracktriggerSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.L1TrackTriggerDefaultCFF)
1730  self.scheduleSequence(_l1tracktriggerSeq,'L1TrackTrigger_step')
1731  return
1732 

◆ prepare_LHE()

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

Definition at line 1407 of file ConfigBuilder.py.

1407  def prepare_LHE(self, stepSpec = None):
1408  #load the fragment
1409 
1410  loadFragment = self._options.evt_type.replace('.py','',).replace('.','_').replace('python/','').replace('/','.')
1411  print("Loading lhe fragment from",loadFragment)
1412  __import__(loadFragment)
1413  self.process.load(loadFragment)
1414 
1415  self._options.inlineObjects+=','+stepSpec
1416 
1417  getattr(self.process,stepSpec).nEvents = self._options.number
1418 
1419  #schedule it
1420  self.process.lhe_step = cms.Path( getattr( self.process,stepSpec) )
1421  self.excludedPaths.append("lhe_step")
1422  self.schedule.append( self.process.lhe_step )
1423 
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 1818 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().

1818  def prepare_NANO(self, stepSpec = '' ):
1819  print(f"in prepare_nano {stepSpec}")
1820  ''' Enrich the schedule with NANO '''
1821  _,_nanoSeq,_nanoCff = self.loadDefaultOrSpecifiedCFF(stepSpec,self.NANODefaultCFF,self.NANODefaultSeq)
1822 
1823  # create full specified sequence using autoNANO
1824  from PhysicsTools.NanoAOD.autoNANO import autoNANO, expandNanoMapping
1825  # if not a autoNANO mapping, load an empty customization, which later will be converted into the default.
1826  _nanoCustoms = _nanoSeq.split('+') if '@' in stepSpec else ['']
1827  _nanoSeq = _nanoSeq.split('+')
1828  expandNanoMapping(_nanoSeq, autoNANO, 'sequence')
1829  expandNanoMapping(_nanoCustoms, autoNANO, 'customize')
1830  # make sure there are no duplicates while preserving the ordering
1831  _nanoSeq = list(sorted(set(_nanoSeq), key=_nanoSeq.index))
1832  _nanoCustoms = list(sorted(set(_nanoCustoms), key=_nanoCustoms.index))
1833  # replace empty sequence with default
1834  _nanoSeq = [seq if seq!='' else self.NANODefaultSeq for seq in _nanoSeq]
1835  _nanoCustoms = [cust if cust!='' else self.NANODefaultCustom for cust in _nanoCustoms]
1836  # build and inject the sequence
1837  if len(_nanoSeq) < 1 and '@' in stepSpec:
1838  raise Exception(f'The specified mapping: {stepSpec} generates an empty NANO sequence. Please provide a valid mappign')
1839  _seqToSchedule = []
1840  for _subSeq in _nanoSeq:
1841  if '.' in _subSeq:
1842  _cff,_seq = _subSeq.split('.')
1843  self.loadAndRemember(_cff)
1844  _seqToSchedule.append(_seq)
1845  elif '/' in _subSeq:
1846  self.loadAndRemember(_subSeq)
1847  _seqToSchedule.append(self.NANODefaultSeq)
1848  else:
1849  _seqToSchedule.append(_subSeq)
1850  self.scheduleSequence('+'.join(_seqToSchedule), 'nanoAOD_step')
1851 
1852  # add the customisations
1853  for custom in _nanoCustoms:
1854  custom_path = custom if '.' in custom else '.'.join([_nanoCff,custom])
1855  # customization order can be important for NANO, here later specified customise take precedence
1856  self._options.customisation_file.append(custom_path)
1857  if self._options.hltProcess:
1858  if len(self._options.customise_commands) > 1:
1859  self._options.customise_commands = self._options.customise_commands + " \n"
1860  self._options.customise_commands = self._options.customise_commands + "process.unpackedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1861 
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 1862 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().

1862  def prepare_NANOGEN(self, stepSpec = "nanoAOD"):
1863  ''' Enrich the schedule with NANOGEN '''
1864  # TODO: Need to modify this based on the input file type
1865  fromGen = any([x in self.stepMap for x in ['LHE', 'GEN', 'AOD']])
1866  _,_nanogenSeq,_nanogenCff = self.loadDefaultOrSpecifiedCFF(stepSpec,self.NANOGENDefaultCFF)
1867  self.scheduleSequence(_nanogenSeq,'nanoAOD_step')
1868  custom = "customizeNanoGEN" if fromGen else "customizeNanoGENFromMini"
1869  if self._options.runUnscheduled:
1870  self._options.customisation_file_unsch.insert(0, '.'.join([_nanogenCff, custom]))
1871  else:
1872  self._options.customisation_file.insert(0, '.'.join([_nanogenCff, custom]))
1873 
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 1786 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().

1786  def prepare_PAT(self, stepSpec = "miniAOD"):
1787  ''' Enrich the schedule with PAT '''
1788  self.prepare_PATFILTER(self)
1789  self.loadDefaultOrSpecifiedCFF(stepSpec,self.PATDefaultCFF)
1790  self.labelsToAssociate.append('patTask')
1791  if self._options.isData:
1792  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllData")
1793  else:
1794  if self._options.fast:
1795  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMCFastSim")
1796  else:
1797  self._options.customisation_file_unsch.insert(0,"PhysicsTools/PatAlgos/slimming/miniAOD_tools.miniAOD_customizeAllMC")
1798 
1799  if self._options.hltProcess:
1800  if len(self._options.customise_commands) > 1:
1801  self._options.customise_commands = self._options.customise_commands + " \n"
1802  self._options.customise_commands = self._options.customise_commands + "process.patTrigger.processName = \""+self._options.hltProcess+"\"\n"
1803  self._options.customise_commands = self._options.customise_commands + "process.slimmedPatTrigger.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1804  self._options.customise_commands = self._options.customise_commands + "process.patMuons.triggerResults= cms.InputTag( 'TriggerResults::"+self._options.hltProcess+"' )\n"
1805 
1806 # self.renameHLTprocessInSequence(sequence)
1807 
1808  return
1809 

◆ prepare_PATFILTER()

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

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

1709  def prepare_PATFILTER(self, stepSpec = None):
1710  self.loadAndRemember("PhysicsTools/PatAlgos/slimming/metFilterPaths_cff")
1711  from PhysicsTools.PatAlgos.slimming.metFilterPaths_cff import allMetFilterPaths
1712  for filt in allMetFilterPaths:
1713  self.schedule.append(getattr(self.process,'Flag_'+filt))
1714 

◆ prepare_PATGEN()

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

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

1810  def prepare_PATGEN(self, stepSpec = "miniGEN"):
1811  ''' Enrich the schedule with PATGEN '''
1812  self.loadDefaultOrSpecifiedCFF(stepSpec,self.PATGENDefaultCFF) #this is unscheduled
1813  self.labelsToAssociate.append('patGENTask')
1814  if self._options.isData:
1815  raise Exception("PATGEN step can only run on MC")
1816  return
1817 

◆ prepare_POSTRECO()

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

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

1935  def prepare_POSTRECO(self, stepSpec = None):
1936  """ Enrich the schedule with the postreco step """
1937  self.loadAndRemember(self.POSTRECODefaultCFF)
1938  self.scheduleSequence('postreco_generator','postreco_step')
1939  return
1940 
1941 

◆ prepare_RAW2DIGI()

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

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

1704  def prepare_RAW2DIGI(self, stepSpec = "RawToDigi"):
1705  _,_raw2digiSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RAW2DIGIDefaultCFF)
1706  self.scheduleSequence(_raw2digiSeq,'raw2digi_step')
1707  return
1708 

◆ prepare_RAW2RECO()

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

Definition at line 1694 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_HLT().

1694  def prepare_RAW2RECO(self, stepSpec = None):
1695  if ','in stepSpec:
1696  seqReco,seqDigi=stepSpec.spli(',')
1697  else:
1698  print(f"RAW2RECO requires two specifications {stepSpec} insufficient")
1699 
1700  self.prepare_RAW2DIGI(seqDigi)
1701  self.prepare_RECO(seqReco)
1702  return
1703 
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 1765 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().

1765  def prepare_RECO(self, stepSpec = "reconstruction"):
1766  ''' Enrich the schedule with reconstruction '''
1767  _,_recoSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RECODefaultCFF)
1768  self.scheduleSequence(_recoSeq,'reconstruction_step')
1769  return
1770 

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

1777  def prepare_RECOBEFMIX(self, stepSpec = "reconstruction"):
1778  ''' Enrich the schedule with the part of reconstruction that is done before mixing in FastSim'''
1779  if not self._options.fast:
1780  print("ERROR: this step is only implemented for FastSim")
1781  sys.exit()
1782  _,_recobefmixSeq,_ = self.loadDefaultOrSpecifiedCFF(self.RECOBEFMIXDefaultSeq,self.RECOBEFMIXDefaultCFF)
1783  self.scheduleSequence(_recobefmixSeq,'reconstruction_befmix_step')
1784  return
1785 
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 1771 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().

1771  def prepare_RECOSIM(self, stepSpec = "recosim"):
1772  ''' Enrich the schedule with reconstruction '''
1773  _,_recosimSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.RECOSIMDefaultCFF)
1774  self.scheduleSequence(_recosimSeq,'recosim_step')
1775  return
1776 

◆ prepare_REPACK()

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

Definition at line 1578 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

1578  def prepare_REPACK(self, stepSpec = None):
1579  _,_repackSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.REPACKDefaultCFF)
1580  self.scheduleSequence(_repackSeq,'digi2repack_step')
1581  return
1582 

◆ prepare_SIM()

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

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

1513  def prepare_SIM(self, stepSpec = None):
1514  """ Enrich the schedule with the simulation step"""
1515  _,_simSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.SIMDefaultCFF)
1516  if not self._options.fast:
1517  if self._options.gflash==True:
1518  self.loadAndRemember("Configuration/StandardSequences/GFlashSIM_cff")
1519 
1520  if self._options.magField=='0T':
1521  self.executeAndRemember("process.g4SimHits.UseMagneticField = cms.bool(False)")
1522  else:
1523  if self._options.magField=='0T':
1524  self.executeAndRemember("process.fastSimProducer.detectorDefinition.magneticFieldZ = cms.untracked.double(0.)")
1525 
1526  self.scheduleSequence(_simSeq,'simulation_step')
1527  return
1528 

◆ prepare_SKIM()

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

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

1874  def prepare_SKIM(self, stepSpec = "all"):
1875  ''' Enrich the schedule with skimming fragments'''
1876  skimConfig,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.SKIMDefaultCFF)
1877 
1878  stdHLTProcName = 'HLT'
1879  newHLTProcName = self._options.hltProcess
1880  customiseForReHLT = (newHLTProcName or (stdHLTProcName in self.stepMap)) and (newHLTProcName != stdHLTProcName)
1881  if customiseForReHLT:
1882  print("replacing %s process name - step SKIM:%s will use '%s'" % (stdHLTProcName, sequence, newHLTProcName))
1883 
1884 
1885  from Configuration.Skimming.autoSkim import autoSkim
1886  skimlist = sequence.split('+')
1887  self.expandMapping(skimlist,autoSkim)
1888 
1889  #print("dictionary for skims:", skimConfig.__dict__)
1890  for skim in skimConfig.__dict__:
1891  skimstream = getattr(skimConfig, skim)
1892 
1893  # blacklist AlCa paths so that they do not appear in the cfg
1894  if isinstance(skimstream, cms.Path):
1895  self.blacklist_paths.append(skimstream)
1896  # if enabled, apply "hltProcess" renaming to Sequences
1897  elif isinstance(skimstream, cms.Sequence):
1898  if customiseForReHLT:
1899  self.renameHLTprocessInSequence(skim, proc = newHLTProcName, HLTprocess = stdHLTProcName, verbosityLevel = 0)
1900 
1901  if not isinstance(skimstream, cms.FilteredStream):
1902  continue
1903 
1904  shortname = skim.replace('SKIMStream','')
1905  if (sequence=="all"):
1906  self.addExtraStream(skim,skimstream)
1907  elif (shortname in skimlist):
1908  self.addExtraStream(skim,skimstream)
1909  #add a DQM eventcontent for this guy
1910  if self._options.datatier=='DQM':
1911  self.process.load(self.EVTCONTDefaultCFF)
1912  skimstreamDQM = cms.FilteredStream(
1913  responsible = skimstream.responsible,
1914  name = skimstream.name+'DQM',
1915  paths = skimstream.paths,
1916  selectEvents = skimstream.selectEvents,
1917  content = self._options.datatier+'EventContent',
1918  dataTier = cms.untracked.string(self._options.datatier)
1919  )
1920  self.addExtraStream(skim+'DQM',skimstreamDQM)
1921  for i in range(skimlist.count(shortname)):
1922  skimlist.remove(shortname)
1923 
1924  if (skimlist.__len__()!=0 and sequence!="all"):
1925  print('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1926  raise Exception('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
1927 
1928 
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 1929 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().

1929  def prepare_USER(self, stepSpec = None):
1930  ''' Enrich the schedule with a user defined sequence '''
1931  _,_userSeq,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.USERDefaultCFF)
1932  self.scheduleSequence(_userSeq,'user_step')
1933  return
1934 

◆ prepare_VALIDATION()

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

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

1942  def prepare_VALIDATION(self, stepSpec = 'validation'):
1943  print(f"{stepSpec} in preparing validation")
1944  _,sequence,_ = self.loadDefaultOrSpecifiedCFF(stepSpec,self.VALIDATIONDefaultCFF)
1945  from Validation.Configuration.autoValidation import autoValidation
1946  #in case VALIDATION:something:somethingelse -> something,somethingelse
1947  if sequence.find(',')!=-1:
1948  prevalSeqName=sequence.split(',')[0].split('+')
1949  valSeqName=sequence.split(',')[1].split('+')
1950  self.expandMapping(prevalSeqName,autoValidation,index=0)
1951  self.expandMapping(valSeqName,autoValidation,index=1)
1952  else:
1953  if '@' in sequence:
1954  prevalSeqName=sequence.split('+')
1955  valSeqName=sequence.split('+')
1956  self.expandMapping(prevalSeqName,autoValidation,index=0)
1957  self.expandMapping(valSeqName,autoValidation,index=1)
1958  else:
1959  postfix=''
1960  if sequence:
1961  postfix='_'+sequence
1962  prevalSeqName=['prevalidation'+postfix]
1963  valSeqName=['validation'+postfix]
1964  if not hasattr(self.process,valSeqName[0]):
1965  prevalSeqName=['']
1966  valSeqName=[sequence]
1967 
1968  def NFI(index):
1969 
1970  if index==0:
1971  return ''
1972  else:
1973  return '%s'%index
1974 
1975 
1976  #rename the HLT process in validation steps
1977  if ('HLT' in self.stepMap and not self._options.fast) or self._options.hltProcess:
1978  for s in valSeqName+prevalSeqName:
1979  if s:
1980  self.renameHLTprocessInSequence(s)
1981  for (i,s) in enumerate(prevalSeqName):
1982  if s:
1983  setattr(self.process,'prevalidation_step%s'%NFI(i), cms.Path( getattr(self.process, s)) )
1984  self.schedule.append(getattr(self.process,'prevalidation_step%s'%NFI(i)))
1985 
1986  for (i,s) in enumerate(valSeqName):
1987  setattr(self.process,'validation_step%s'%NFI(i), cms.EndPath( getattr(self.process, s)))
1988  self.schedule.append(getattr(self.process,'validation_step%s'%NFI(i)))
1989 
1990  #needed in case the miniAODValidation sequence is run starting from AODSIM
1991  if 'PAT' in self.stepMap and not 'RECO' in self.stepMap:
1992  return
1993 
1994  if not 'DIGI' in self.stepMap and not self._options.fast and not any(map( lambda s : s.startswith('genvalid'), valSeqName)):
1995  if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True:
1996  self._options.restoreRNDSeeds=True
1997 
1998  if not 'DIGI' in self.stepMap and not self._options.isData and not self._options.fast:
1999  self.executeAndRemember("process.mix.playback = True")
2000  self.executeAndRemember("process.mix.digitizers = cms.PSet()")
2001  self.executeAndRemember("for a in process.aliases: delattr(process, a)")
2002  self._options.customisation_file.append("SimGeneral/MixingModule/fullMixCustomize_cff.setCrossingFrameOn")
2003 
2004  if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
2005  #will get in the schedule, smoothly
2006  for (i,s) in enumerate(valSeqName):
2007  getattr(self.process,'validation_step%s'%NFI(i)).insert(0, self.process.genstepfilter)
2008 
2009  return
2010 
2011 
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 277 of file ConfigBuilder.py.

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

Referenced by ConfigBuilder.ConfigBuilder.addCommon().

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

◆ renameHLTprocessInSequence()

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

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

2081  def renameHLTprocessInSequence(self, sequence, proc=None, HLTprocess='HLT', verbosityLevel=1):
2082  if proc == None:
2083  proc = self._options.hltProcess if self._options.hltProcess else self.process.name_()
2084  if proc == HLTprocess:
2085  return
2086  # look up all module in sequence
2087  if verbosityLevel > 0:
2088  print("replacing %s process name - sequence %s will use '%s'" % (HLTprocess, sequence, proc))
2089  verboseVisit = (verbosityLevel > 1)
2090  getattr(self.process,sequence).visit(
2091  ConfigBuilder.MassSearchReplaceProcessNameVisitor(HLTprocess, proc, whitelist = ("subSystemFolder",), verbose = verboseVisit))
2092  if 'from Configuration.Applications.ConfigBuilder import ConfigBuilder' not in self.additionalCommands:
2093  self.additionalCommands.append('from Configuration.Applications.ConfigBuilder import ConfigBuilder')
2094  self.additionalCommands.append(
2095  'process.%s.visit(ConfigBuilder.MassSearchReplaceProcessNameVisitor("%s", "%s", whitelist = ("subSystemFolder",), verbose = %s))'
2096  % (sequence, HLTprocess, proc, verboseVisit))
2097 
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 2071 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().

2071  def renameInputTagsInSequence(self,sequence,oldT="rawDataCollector",newT="rawDataRepacker"):
2072  print("Replacing all InputTag %s => %s"%(oldT,newT))
2073  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
2074  massSearchReplaceAnyInputTag(getattr(self.process,sequence),oldT,newT)
2075  loadMe='from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag'
2076  if not loadMe in self.additionalCommands:
2077  self.additionalCommands.append(loadMe)
2078  self.additionalCommands.append('massSearchReplaceAnyInputTag(process.%s,"%s","%s",False,True)'%(sequence,oldT,newT))
2079 
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 1302 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().

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

◆ scheduleSequenceAtEnd()

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

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

1331  def scheduleSequenceAtEnd(self,seq,prefix):
1332  self.scheduleSequence(seq,prefix,what='EndPath')
1333  return
1334 

Member Data Documentation

◆ _options

◆ addedObjects

◆ additionalCommands

◆ additionalOutputs

ConfigBuilder.ConfigBuilder.additionalOutputs

Definition at line 269 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ ALCADefaultCFF

ConfigBuilder.ConfigBuilder.ALCADefaultCFF

◆ ALCADefaultSeq

ConfigBuilder.ConfigBuilder.ALCADefaultSeq

Definition at line 1051 of file ConfigBuilder.py.

◆ ALCAHARVESTDefaultCFF

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultCFF

Definition at line 1039 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ALCAHARVEST().

◆ ALCAHARVESTDefaultSeq

ConfigBuilder.ConfigBuilder.ALCAHARVESTDefaultSeq

Definition at line 1063 of file ConfigBuilder.py.

◆ AlCaPaths

ConfigBuilder.ConfigBuilder.AlCaPaths

◆ blacklist_paths

ConfigBuilder.ConfigBuilder.blacklist_paths

◆ CFWRITERDefaultCFF

ConfigBuilder.ConfigBuilder.CFWRITERDefaultCFF

Definition at line 1042 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_CFWRITER().

◆ CFWRITERDefaultSeq

ConfigBuilder.ConfigBuilder.CFWRITERDefaultSeq

Definition at line 1064 of file ConfigBuilder.py.

◆ conditionalPaths

ConfigBuilder.ConfigBuilder.conditionalPaths

◆ ConditionsDefaultCFF

ConfigBuilder.ConfigBuilder.ConditionsDefaultCFF

Definition at line 1041 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addConditions().

◆ DATAMIXDefaultCFF

ConfigBuilder.ConfigBuilder.DATAMIXDefaultCFF

Definition at line 1046 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DATAMIX().

◆ DATAMIXDefaultSeq

ConfigBuilder.ConfigBuilder.DATAMIXDefaultSeq

Definition at line 1056 of file ConfigBuilder.py.

◆ DIGI2RAWDefaultCFF

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultCFF

Definition at line 1019 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI2RAW().

◆ DIGI2RAWDefaultSeq

ConfigBuilder.ConfigBuilder.DIGI2RAWDefaultSeq

Definition at line 1057 of file ConfigBuilder.py.

◆ DIGIDefaultCFF

ConfigBuilder.ConfigBuilder.DIGIDefaultCFF

Definition at line 1018 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DIGI().

◆ DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.DIGIDefaultSeq

Definition at line 1055 of file ConfigBuilder.py.

◆ DQMDefaultSeq

ConfigBuilder.ConfigBuilder.DQMDefaultSeq

Definition at line 1075 of file ConfigBuilder.py.

◆ DQMOFFLINEDefaultCFF

ConfigBuilder.ConfigBuilder.DQMOFFLINEDefaultCFF

Definition at line 1037 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_DQM().

◆ DQMSaverCFF

ConfigBuilder.ConfigBuilder.DQMSaverCFF

Definition at line 2162 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_HARVESTING().

◆ ENDJOBDefaultCFF

ConfigBuilder.ConfigBuilder.ENDJOBDefaultCFF

Definition at line 1040 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_ENDJOB().

◆ ENDJOBDefaultSeq

ConfigBuilder.ConfigBuilder.ENDJOBDefaultSeq

Definition at line 1077 of file ConfigBuilder.py.

◆ EVTCONTDefaultCFF

ConfigBuilder.ConfigBuilder.EVTCONTDefaultCFF

◆ excludedPaths

ConfigBuilder.ConfigBuilder.excludedPaths

Definition at line 275 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ GENDefaultCFF

ConfigBuilder.ConfigBuilder.GENDefaultCFF

Definition at line 1016 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GENDefaultSeq

ConfigBuilder.ConfigBuilder.GENDefaultSeq

Definition at line 1053 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ GeometryCFF

ConfigBuilder.ConfigBuilder.GeometryCFF

Definition at line 1149 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ geometryDBLabel

ConfigBuilder.ConfigBuilder.geometryDBLabel

Definition at line 1150 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ HARVESTINGDefaultCFF

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultCFF

Definition at line 1038 of file ConfigBuilder.py.

◆ HARVESTINGDefaultSeq

ConfigBuilder.ConfigBuilder.HARVESTINGDefaultSeq

Definition at line 1062 of file ConfigBuilder.py.

◆ HLTDefaultCFF

ConfigBuilder.ConfigBuilder.HLTDefaultCFF

Definition at line 1023 of file ConfigBuilder.py.

◆ HLTDefaultSeq

ConfigBuilder.ConfigBuilder.HLTDefaultSeq

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

Referenced by ConfigBuilder.ConfigBuilder.prepare_FILTER().

◆ L1DefaultSeq

ConfigBuilder.ConfigBuilder.L1DefaultSeq

Definition at line 1059 of file ConfigBuilder.py.

◆ L1EMDefaultCFF

ConfigBuilder.ConfigBuilder.L1EMDefaultCFF

Definition at line 1020 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1().

◆ L1HwValDefaultCFF

ConfigBuilder.ConfigBuilder.L1HwValDefaultCFF

Definition at line 1036 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1HwVal().

◆ L1HwValDefaultSeq

ConfigBuilder.ConfigBuilder.L1HwValDefaultSeq

Definition at line 1074 of file ConfigBuilder.py.

◆ L1MENUDefaultCFF

ConfigBuilder.ConfigBuilder.L1MENUDefaultCFF

Definition at line 1022 of file ConfigBuilder.py.

◆ L1P2GTDefaultCFF

ConfigBuilder.ConfigBuilder.L1P2GTDefaultCFF

Definition at line 1021 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1P2GT().

◆ L1P2GTDefaultSeq

ConfigBuilder.ConfigBuilder.L1P2GTDefaultSeq

Definition at line 1060 of file ConfigBuilder.py.

◆ L1RecoDefaultCFF

ConfigBuilder.ConfigBuilder.L1RecoDefaultCFF

Definition at line 1026 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_L1Reco().

◆ L1RecoDefaultSeq

ConfigBuilder.ConfigBuilder.L1RecoDefaultSeq

Definition at line 1066 of file ConfigBuilder.py.

◆ L1REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.L1REPACKDefaultSeq

Definition at line 1061 of file ConfigBuilder.py.

◆ L1TrackTriggerDefaultCFF

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultCFF

◆ L1TrackTriggerDefaultSeq

ConfigBuilder.ConfigBuilder.L1TrackTriggerDefaultSeq

Definition at line 1067 of file ConfigBuilder.py.

◆ labelsToAssociate

ConfigBuilder.ConfigBuilder.labelsToAssociate

◆ LHEDefaultSeq

ConfigBuilder.ConfigBuilder.LHEDefaultSeq

Definition at line 1052 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_GEN().

◆ magFieldCFF

ConfigBuilder.ConfigBuilder.magFieldCFF

Definition at line 1145 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ NANODefaultCFF

ConfigBuilder.ConfigBuilder.NANODefaultCFF

Definition at line 1031 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultCustom

ConfigBuilder.ConfigBuilder.NANODefaultCustom

Definition at line 1084 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANODefaultSeq

ConfigBuilder.ConfigBuilder.NANODefaultSeq

Definition at line 1083 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANO().

◆ NANOGENDefaultCFF

ConfigBuilder.ConfigBuilder.NANOGENDefaultCFF

Definition at line 1032 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_NANOGEN().

◆ NANOGENDefaultSeq

ConfigBuilder.ConfigBuilder.NANOGENDefaultSeq

Definition at line 1082 of file ConfigBuilder.py.

◆ nextScheduleIsConditional

ConfigBuilder.ConfigBuilder.nextScheduleIsConditional

put the filtering path in the schedule

Definition at line 273 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.scheduleSequence().

◆ PATDefaultCFF

ConfigBuilder.ConfigBuilder.PATDefaultCFF

Definition at line 1030 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PAT().

◆ PATDefaultSeq

ConfigBuilder.ConfigBuilder.PATDefaultSeq

Definition at line 1079 of file ConfigBuilder.py.

◆ PATGENDefaultCFF

ConfigBuilder.ConfigBuilder.PATGENDefaultCFF

Definition at line 1096 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_PATGEN().

◆ PATGENDefaultSeq

ConfigBuilder.ConfigBuilder.PATGENDefaultSeq

Definition at line 1080 of file ConfigBuilder.py.

◆ POSTRECODefaultCFF

ConfigBuilder.ConfigBuilder.POSTRECODefaultCFF

Definition at line 1034 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_POSTRECO().

◆ POSTRECODefaultSeq

ConfigBuilder.ConfigBuilder.POSTRECODefaultSeq

Definition at line 1073 of file ConfigBuilder.py.

◆ process

ConfigBuilder.ConfigBuilder.process

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

Definition at line 250 of file ConfigBuilder.py.

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

◆ productionFilterSequence

ConfigBuilder.ConfigBuilder.productionFilterSequence

put it before all the other paths

Definition at line 271 of file ConfigBuilder.py.

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

◆ pythonCfgCode

ConfigBuilder.ConfigBuilder.pythonCfgCode

◆ RAW2DIGIDefaultCFF

ConfigBuilder.ConfigBuilder.RAW2DIGIDefaultCFF

Definition at line 1024 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RAW2DIGI().

◆ RAW2DIGIDefaultSeq

ConfigBuilder.ConfigBuilder.RAW2DIGIDefaultSeq

Definition at line 1065 of file ConfigBuilder.py.

◆ RAW2RECODefaultSeq

ConfigBuilder.ConfigBuilder.RAW2RECODefaultSeq

Definition at line 1139 of file ConfigBuilder.py.

◆ RECOBEFMIXDefaultCFF

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultCFF

Definition at line 1200 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECOBEFMIXDefaultSeq

ConfigBuilder.ConfigBuilder.RECOBEFMIXDefaultSeq

Definition at line 1201 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOBEFMIX().

◆ RECODefaultCFF

ConfigBuilder.ConfigBuilder.RECODefaultCFF

Definition at line 1028 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECO().

◆ RECODefaultSeq

ConfigBuilder.ConfigBuilder.RECODefaultSeq

Definition at line 1069 of file ConfigBuilder.py.

◆ RECOSIMDefaultCFF

ConfigBuilder.ConfigBuilder.RECOSIMDefaultCFF

Definition at line 1029 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_RECOSIM().

◆ RECOSIMDefaultSeq

ConfigBuilder.ConfigBuilder.RECOSIMDefaultSeq

Definition at line 1072 of file ConfigBuilder.py.

◆ REDIGIDefaultSeq

ConfigBuilder.ConfigBuilder.REDIGIDefaultSeq

Definition at line 1216 of file ConfigBuilder.py.

◆ REPACKDefaultCFF

ConfigBuilder.ConfigBuilder.REPACKDefaultCFF

Definition at line 1043 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_REPACK().

◆ REPACKDefaultSeq

ConfigBuilder.ConfigBuilder.REPACKDefaultSeq

Definition at line 1078 of file ConfigBuilder.py.

◆ runsAndWeights

ConfigBuilder.ConfigBuilder.runsAndWeights

drop LHEXMLStringProduct on input to save memory if appropriate

Definition at line 538 of file ConfigBuilder.py.

◆ runsAndWeightsInt

ConfigBuilder.ConfigBuilder.runsAndWeightsInt

Definition at line 559 of file ConfigBuilder.py.

◆ schedule

◆ scheduleIndexOfFirstHLTPath

ConfigBuilder.ConfigBuilder.scheduleIndexOfFirstHLTPath

◆ SIMDefaultCFF

ConfigBuilder.ConfigBuilder.SIMDefaultCFF

Definition at line 1017 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SIM().

◆ SIMDefaultSeq

ConfigBuilder.ConfigBuilder.SIMDefaultSeq

Definition at line 1054 of file ConfigBuilder.py.

◆ SimGeometryCFF

ConfigBuilder.ConfigBuilder.SimGeometryCFF

Definition at line 1175 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ SKIMDefaultCFF

ConfigBuilder.ConfigBuilder.SKIMDefaultCFF

Definition at line 1033 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_SKIM().

◆ stepKeys

ConfigBuilder.ConfigBuilder.stepKeys

Definition at line 230 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.addStandardSequences().

◆ stepMap

◆ USERDefaultCFF

ConfigBuilder.ConfigBuilder.USERDefaultCFF

Definition at line 1142 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_USER().

◆ USERDefaultSeq

ConfigBuilder.ConfigBuilder.USERDefaultSeq

Definition at line 1141 of file ConfigBuilder.py.

◆ VALIDATIONDefaultCFF

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultCFF

Definition at line 1035 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare_VALIDATION().

◆ VALIDATIONDefaultSeq

ConfigBuilder.ConfigBuilder.VALIDATIONDefaultSeq

Definition at line 1076 of file ConfigBuilder.py.

◆ with_input

ConfigBuilder.ConfigBuilder.with_input

Definition at line 254 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().

◆ with_output

ConfigBuilder.ConfigBuilder.with_output

Definition at line 249 of file ConfigBuilder.py.

Referenced by ConfigBuilder.ConfigBuilder.prepare().