CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | Private Member Functions | Private Attributes
Config.Process Class Reference
Inheritance diagram for Config.Process:

Public Member Functions

def __delattr__ (self, name)
 
def __init__ (self, name, *Mods)
 
def __setattr__ (self, name, value)
 
def __setstate__ (self, pkldict)
 
def add_ (self, value)
 
def addSubProcess (self, mod)
 
def aliases_ (self)
 
def analyzerNames (self)
 
def analyzers_ (self)
 
def dumpConfig (self, options=PrintOptions())
 
def dumpPython (self, options=PrintOptions())
 
def endpaths_ (self)
 
def es_prefers_ (self)
 
def es_producers_ (self)
 
def es_sources_ (self)
 
def extend (self, other, items=())
 
def fillProcessDesc (self, processPSet)
 
def filterNames (self)
 
def filters_ (self)
 
def globalReplace (self, label, new)
 
def isUsingModifier (self, mod)
 
def load (self, moduleName)
 
def looper_ (self)
 
def name_ (self)
 
def outputModules_ (self)
 
def pathNames (self)
 
def paths_ (self)
 
def prefer (self, esmodule, *args, **kargs)
 
def producerNames (self)
 
def producers_ (self)
 
def prune (self, verbose=False, keepUnresolvedSequencePlaceholders=False)
 
def psets_ (self)
 
def resolve (self, keepUnresolvedSequencePlaceholders=False)
 
def schedule_ (self)
 
def sequences_ (self)
 
def services_ (self)
 
def setLooper_ (self, lpr)
 
def setName_ (self, name)
 
def setPartialSchedule_ (self, sch, label)
 
def setSchedule_ (self, sch)
 
def setSource_ (self, src)
 
def setStrict (self, value)
 
def source_ (self)
 
def splitPython (self, options=PrintOptions())
 
def subProcesses_ (self)
 
def switchProducerNames (self)
 
def switchProducers_ (self)
 
def tasks_ (self)
 
def validate (self)
 
def vpsets_ (self)
 

Static Public Member Functions

def defaultMaxEvents_ ()
 
def defaultMaxLuminosityBlocks_ ()
 
def defaultOptions_ ()
 

Public Attributes

 maxEvents
 
 maxLuminosityBlocks
 
 options
 

Properties

 aliases = property(aliases_,doc="dictionary containing the aliases for the process")
 
 analyzers = property(analyzers_,doc="dictionary containing the analyzers for the process")
 
 endpaths = property(endpaths_,doc="dictionary containing the endpaths for the process")
 
 es_prefers = property(es_prefers_,doc="dictionary containing the es_prefers for the process")
 
 es_producers = property(es_producers_,doc="dictionary containing the es_producers for the process")
 
 es_sources = property(es_sources_,doc="dictionary containing the es_sources for the process")
 
 filters = property(filters_, doc="dictionary containing the filters for the process")
 
 looper = property(looper_,setLooper_,doc='the main looper or None if not set')
 
 outputModules = property(outputModules_,doc="dictionary containing the output_modules for the process")
 
 paths = property(paths_,doc="dictionary containing the paths for the process")
 
 process = property(name_,setName_, doc="name of the process")
 
 producers = property(producers_,doc="dictionary containing the producers for the process")
 
 psets = property(psets_,doc="dictionary containing the PSets for the process")
 
 schedule = property(schedule_,setSchedule_,doc='the schedule or None if not set')
 
 sequences = property(sequences_,doc="dictionary containing the sequences for the process")
 
 services = property(services_,doc="dictionary containing the services for the process")
 
 source = property(source_,setSource_,doc='the main source or None if not set')
 
 subProcesses = property(subProcesses_,doc='the SubProcesses that have been added to the Process')
 
 switchProducers = property(switchProducers_,doc="dictionary containing the SwitchProducers for the process")
 
 tasks = property(tasks_,doc="dictionary containing the tasks for the process")
 
 vpsets = property(vpsets_,doc="dictionary containing the PSets for the process")
 

Private Member Functions

def __findFirstUsingModule (self, seqsOrTasks, mod)
 
def __setObjectLabel (self, object, newLabel)
 
def __updateMaxEvents (self, ps)
 
def __updateOptions (self, opt)
 
def _delattrFromSetattr (self, name)
 
def _delHelper (self, name)
 
def _dumpConfigESPrefers (self, options)
 
def _dumpConfigNamedList (self, items, typeName, options)
 
def _dumpConfigOptionallyNamedList (self, items, typeName, options)
 
def _dumpConfigUnnamedList (self, items, typeName, options)
 
def _dumpPython (self, d, options)
 
def _dumpPythonList (self, d, options)
 
def _dumpPythonSubProcesses (self, l, options)
 
def _findPreferred (self, esname, d, *args, **kargs)
 
def _insertInto (self, parameterSet, itemDict)
 
def _insertManyInto (self, parameterSet, label, itemDict, tracked)
 
def _insertOneInto (self, parameterSet, label, item, tracked)
 
def _insertPaths (self, processPSet, nodeVisitor)
 
def _insertSubProcessesInto (self, parameterSet, label, itemList, tracked)
 
def _insertSwitchProducersInto (self, parameterSet, labelModules, labelAliases, itemDict, tracked)
 
def _itemsInDependencyOrder (self, processDictionaryOfItems)
 
def _okToPlace (self, name, mod, d)
 
def _place (self, name, mod, d)
 
def _placeAlias (self, name, mod)
 
def _placeAnalyzer (self, name, mod)
 
def _placeEndPath (self, name, mod)
 
def _placeESPrefer (self, name, mod)
 
def _placeESProducer (self, name, mod)
 
def _placeESSource (self, name, mod)
 
def _placeFilter (self, name, mod)
 
def _placeLooper (self, name, mod)
 
def _placeOutputModule (self, name, mod)
 
def _placePath (self, name, mod)
 
def _placeProducer (self, name, mod)
 
def _placePSet (self, name, mod)
 
def _placeSequence (self, name, mod)
 
def _placeService (self, typeName, mod)
 
def _placeSource (self, name, mod)
 
def _placeSubProcess (self, name, mod)
 
def _placeSwitchProducer (self, name, mod)
 
def _placeTask (self, name, task)
 
def _placeVPSet (self, name, mod)
 
def _pruneModules (self, d, scheduledNames)
 
def _replaceInSchedule (self, label, new)
 
def _replaceInSequences (self, label, new)
 
def _replaceInTasks (self, label, new)
 
def _splitPython (self, subfolder, d, options)
 
def _splitPythonList (self, subfolder, d, options)
 
def _validateSequence (self, sequence, label)
 
def _validateTask (self, task, label)
 

Private Attributes

 __isStrict
 
 __ppset
 
 __process
 
 __processPSet
 
 __thelist
 

Detailed Description

Root class for a CMS configuration process

Definition at line 102 of file Config.py.

Constructor & Destructor Documentation

◆ __init__()

def Config.Process.__init__ (   self,
  name,
Mods 
)
The argument 'name' will be the name applied to this Process
    Can optionally pass as additional arguments cms.Modifier instances
    that will be used to modify the Process as it is built

Definition at line 104 of file Config.py.

104  def __init__(self,name,*Mods):
105  """The argument 'name' will be the name applied to this Process
106  Can optionally pass as additional arguments cms.Modifier instances
107  that will be used to modify the Process as it is built
108  """
109  self.__dict__['_Process__name'] = name
110  if not name.isalnum():
111  raise RuntimeError("Error: The process name is an empty string or contains non-alphanumeric characters")
112  self.__dict__['_Process__filters'] = {}
113  self.__dict__['_Process__producers'] = {}
114  self.__dict__['_Process__switchproducers'] = {}
115  self.__dict__['_Process__source'] = None
116  self.__dict__['_Process__looper'] = None
117  self.__dict__['_Process__subProcesses'] = []
118  self.__dict__['_Process__schedule'] = None
119  self.__dict__['_Process__analyzers'] = {}
120  self.__dict__['_Process__outputmodules'] = {}
121  self.__dict__['_Process__paths'] = DictTypes.SortedKeysDict() # have to keep the order
122  self.__dict__['_Process__endpaths'] = DictTypes.SortedKeysDict() # of definition
123  self.__dict__['_Process__sequences'] = {}
124  self.__dict__['_Process__tasks'] = {}
125  self.__dict__['_Process__services'] = {}
126  self.__dict__['_Process__essources'] = {}
127  self.__dict__['_Process__esproducers'] = {}
128  self.__dict__['_Process__esprefers'] = {}
129  self.__dict__['_Process__aliases'] = {}
130  self.__dict__['_Process__psets']={}
131  self.__dict__['_Process__vpsets']={}
132  self.__dict__['_cloneToObjectDict'] = {}
133  # policy switch to avoid object overwriting during extend/load
134  self.__dict__['_Process__InExtendCall'] = False
135  self.__dict__['_Process__partialschedules'] = {}
136  self.__isStrict = False
137  self.__dict__['_Process__modifiers'] = Mods
138  self.options = Process.defaultOptions_()
139  self.maxEvents = Process.defaultMaxEvents_()
140  self.maxLuminosityBlocks = Process.defaultMaxLuminosityBlocks_()
141  for m in self.__modifiers:
142  m._setChosen()
143 

Referenced by Config.Process.fillProcessDesc().

Member Function Documentation

◆ __delattr__()

def Config.Process.__delattr__ (   self,
  name 
)

Definition at line 538 of file Config.py.

538  def __delattr__(self,name):
539  self._delHelper(name)
540  obj = getattr(self,name)
541  if not obj is None:
542  if not isinstance(obj, Sequence) and not isinstance(obj, Task):
543  # For modules, ES modules and services we can also remove
544  # the deleted object from Sequences, Paths, EndPaths, and
545  # Tasks. Note that for Sequences and Tasks that cannot be done
546  # reliably as the places where the Sequence or Task was used
547  # might have been expanded so we do not even try. We considered
548  # raising an exception if a Sequences or Task was explicitly
549  # deleted, but did not because when done carefully deletion
550  # is sometimes OK (for example in the prune function where it
551  # has been checked that the deleted Sequence is not used).
552  if obj._isTaskComponent():
553  self._replaceInTasks(name, None)
554  self._replaceInSchedule(name, None)
555  if isinstance(obj, _Sequenceable) or obj._isTaskComponent():
556  self._replaceInSequences(name, None)
557  # now remove it from the process itself
558  try:
559  del self.__dict__[name]
560  except:
561  pass
562 

References Config.Process._delHelper(), Config.Process._replaceInSchedule(), Config.Process._replaceInSequences(), and Config.Process._replaceInTasks().

◆ __findFirstUsingModule()

def Config.Process.__findFirstUsingModule (   self,
  seqsOrTasks,
  mod 
)
private
Given a container of sequences or tasks, find the first sequence or task
containing mod and return it. If none is found, return None

Definition at line 508 of file Config.py.

508  def __findFirstUsingModule(self, seqsOrTasks, mod):
509  """Given a container of sequences or tasks, find the first sequence or task
510  containing mod and return it. If none is found, return None"""
511  from FWCore.ParameterSet.SequenceTypes import ModuleNodeVisitor
512  l = list()
513  for seqOrTask in six.itervalues(seqsOrTasks):
514  l[:] = []
515  v = ModuleNodeVisitor(l)
516  seqOrTask.visit(v)
517  if mod in l:
518  return seqOrTask
519  return None
520 

References list().

Referenced by Config.Process.__setattr__().

◆ __setattr__()

def Config.Process.__setattr__ (   self,
  name,
  value 
)

Definition at line 376 of file Config.py.

376  def __setattr__(self,name,value):
377  # check if the name is well-formed (only _ and alphanumerics are allowed)
378  if not name.replace('_','').isalnum():
379  raise ValueError('The label '+name+' contains forbiden characters')
380 
381  if name == 'options':
382  value = self.__updateOptions(value)
383  if name == 'maxEvents':
384  value = self.__updateMaxEvents(value)
385 
386  # private variable exempt from all this
387  if name.startswith('_Process__'):
388  self.__dict__[name]=value
389  return
390  if not isinstance(value,_ConfigureComponent):
391  raise TypeError("can only assign labels to an object that inherits from '_ConfigureComponent'\n"
392  +"an instance of "+str(type(value))+" will not work - requested label is "+name)
393  if not isinstance(value,_Labelable) and not isinstance(value,Source) and not isinstance(value,Looper) and not isinstance(value,Schedule):
394  if name == value.type_():
395  # Only Services get handled here
396  self.add_(value)
397  return
398  else:
399  raise TypeError("an instance of "+str(type(value))+" can not be assigned the label '"+name+"'.\n"+
400  "Please either use the label '"+value.type_()+" or use the 'add_' method instead.")
401  #clone the item
402  if self.__isStrict:
403  newValue =value.copy()
404  try:
405  newValue._filename = value._filename
406  except:
407  pass
408  value.setIsFrozen()
409  else:
410  newValue =value
411  if not self._okToPlace(name, value, self.__dict__):
412  newFile='top level config'
413  if hasattr(value,'_filename'):
414  newFile = value._filename
415  oldFile='top level config'
416  oldValue = getattr(self,name)
417  if hasattr(oldValue,'_filename'):
418  oldFile = oldValue._filename
419  msg = "Trying to override definition of process."+name
420  msg += "\n new object defined in: "+newFile
421  msg += "\n existing object defined in: "+oldFile
422  raise ValueError(msg)
423  # remove the old object of the name (if there is one)
424  if hasattr(self,name) and not (getattr(self,name)==newValue):
425  # Complain if items in sequences or tasks from load() statements have
426  # degenerate names, but if the user overwrites a name in the
427  # main config, replace it everywhere
428  if newValue._isTaskComponent():
429  if not self.__InExtendCall:
430  self._replaceInTasks(name, newValue)
431  self._replaceInSchedule(name, newValue)
432  else:
433  if not isinstance(newValue, Task):
434  #should check to see if used in task before complaining
435  newFile='top level config'
436  if hasattr(value,'_filename'):
437  newFile = value._filename
438  oldFile='top level config'
439  oldValue = getattr(self,name)
440  if hasattr(oldValue,'_filename'):
441  oldFile = oldValue._filename
442  msg1 = "Trying to override definition of "+name+" while it is used by the task "
443  msg2 = "\n new object defined in: "+newFile
444  msg2 += "\n existing object defined in: "+oldFile
445  s = self.__findFirstUsingModule(self.tasks,oldValue)
446  if s is not None:
447  raise ValueError(msg1+s.label_()+msg2)
448 
449  if isinstance(newValue, _Sequenceable) or newValue._isTaskComponent():
450  if not self.__InExtendCall:
451  self._replaceInSequences(name, newValue)
452  else:
453  #should check to see if used in sequence before complaining
454  newFile='top level config'
455  if hasattr(value,'_filename'):
456  newFile = value._filename
457  oldFile='top level config'
458  oldValue = getattr(self,name)
459  if hasattr(oldValue,'_filename'):
460  oldFile = oldValue._filename
461  msg1 = "Trying to override definition of "+name+" while it is used by the "
462  msg2 = "\n new object defined in: "+newFile
463  msg2 += "\n existing object defined in: "+oldFile
464  s = self.__findFirstUsingModule(self.sequences,oldValue)
465  if s is not None:
466  raise ValueError(msg1+"sequence "+s.label_()+msg2)
467  s = self.__findFirstUsingModule(self.paths,oldValue)
468  if s is not None:
469  raise ValueError(msg1+"path "+s.label_()+msg2)
470  s = self.__findFirstUsingModule(self.endpaths,oldValue)
471  if s is not None:
472  raise ValueError(msg1+"endpath "+s.label_()+msg2)
473 
474  # In case of EDAlias, raise Exception always to avoid surprises
475  if isinstance(newValue, EDAlias):
476  oldValue = getattr(self, name)
477  #should check to see if used in task/sequence before complaining
478  newFile='top level config'
479  if hasattr(value,'_filename'):
480  newFile = value._filename
481  oldFile='top level config'
482  if hasattr(oldValue,'_filename'):
483  oldFile = oldValue._filename
484  msg1 = "Trying to override definition of "+name+" with an EDAlias while it is used by the "
485  msg2 = "\n new object defined in: "+newFile
486  msg2 += "\n existing object defined in: "+oldFile
487  s = self.__findFirstUsingModule(self.tasks,oldValue)
488  if s is not None:
489  raise ValueError(msg1+"task "+s.label_()+msg2)
490  s = self.__findFirstUsingModule(self.sequences,oldValue)
491  if s is not None:
492  raise ValueError(msg1+"sequence "+s.label_()+msg2)
493  s = self.__findFirstUsingModule(self.paths,oldValue)
494  if s is not None:
495  raise ValueError(msg1+"path "+s.label_()+msg2)
496  s = self.__findFirstUsingModule(self.endpaths,oldValue)
497  if s is not None:
498  raise ValueError(msg1+"endpath "+s.label_()+msg2)
499 
500  self._delattrFromSetattr(name)
501  self.__dict__[name]=newValue
502  if isinstance(newValue,_Labelable):
503  self.__setObjectLabel(newValue, name)
504  self._cloneToObjectDict[id(value)] = newValue
505  self._cloneToObjectDict[id(newValue)] = newValue
506  #now put in proper bucket
507  newValue._place(name,self)

References Config.Process.__findFirstUsingModule(), Config.Process.__isStrict, Config.Process.__setObjectLabel(), Config.Process.__updateMaxEvents(), Config.Process.__updateOptions(), Config.Process._delattrFromSetattr(), Config.Process._okToPlace(), Config.Process._replaceInSchedule(), Config.Process._replaceInSequences(), Config.Process._replaceInTasks(), Config.Process.add_(), Config.Process.endpaths, triggerObjects_cff.id, cms::DDSpecPar.paths, Config.Process.paths, Config.Process.sequences, str, and Config.Process.tasks.

Referenced by Config.Process._findPreferred(), Config.Process.extend(), and GenObject.GenObject.setValue().

◆ __setObjectLabel()

def Config.Process.__setObjectLabel (   self,
  object,
  newLabel 
)
private

Definition at line 349 of file Config.py.

349  def __setObjectLabel(self, object, newLabel) :
350  if not object.hasLabel_() :
351  object.setLabel(newLabel)
352  return
353  if newLabel == object.label_() :
354  return
355  if newLabel is None :
356  object.setLabel(None)
357  return
358  if (hasattr(self, object.label_()) and id(getattr(self, object.label_())) == id(object)) :
359  msg100 = "Attempting to change the label of an attribute of the Process\n"
360  msg101 = "Old label = "+object.label_()+" New label = "+newLabel+"\n"
361  msg102 = "Type = "+str(type(object))+"\n"
362  msg103 = "Some possible solutions:\n"
363  msg104 = " 1. Clone modules instead of using simple assignment. Cloning is\n"
364  msg105 = " also preferred for other types when possible.\n"
365  msg106 = " 2. Declare new names starting with an underscore if they are\n"
366  msg107 = " for temporaries you do not want propagated into the Process. The\n"
367  msg108 = " underscore tells \"from x import *\" and process.load not to import\n"
368  msg109 = " the name.\n"
369  msg110 = " 3. Reorganize so the assigment is not necessary. Giving a second\n"
370  msg111 = " name to the same object usually causes confusion and problems.\n"
371  msg112 = " 4. Compose Sequences: newName = cms.Sequence(oldName)\n"
372  raise ValueError(msg100+msg101+msg102+msg103+msg104+msg105+msg106+msg107+msg108+msg109+msg110+msg111+msg112)
373  object.setLabel(None)
374  object.setLabel(newLabel)
375 

References triggerObjects_cff.id, and str.

Referenced by Config.Process.__setattr__(), Config.Process._place(), and Config.Process.extend().

◆ __setstate__()

def Config.Process.__setstate__ (   self,
  pkldict 
)
Unpickling hook.

Since cloneToObjectDict stores a hash of objects by their
id() it needs to be updated when unpickling to use the
new object id values instantiated during the unpickle.

Definition at line 165 of file Config.py.

165  def __setstate__(self, pkldict):
166  """
167  Unpickling hook.
168 
169  Since cloneToObjectDict stores a hash of objects by their
170  id() it needs to be updated when unpickling to use the
171  new object id values instantiated during the unpickle.
172 
173  """
174  self.__dict__.update(pkldict)
175  tmpDict = {}
176  for value in self._cloneToObjectDict.values():
177  tmpDict[id(value)] = value
178  self.__dict__['_cloneToObjectDict'] = tmpDict
179 
180 
181 

References triggerObjects_cff.id, update, and contentValuesCheck.values.

◆ __updateMaxEvents()

def Config.Process.__updateMaxEvents (   self,
  ps 
)
private

Definition at line 253 of file Config.py.

253  def __updateMaxEvents(self,ps):
254  newMax = self.defaultMaxEvents_()
255  if isinstance(ps,dict):
256  for k,v in six.iteritems(ps):
257  setattr(newMax,k,v)
258  else:
259  for p in ps.parameters_():
260  setattr(newMax, p, getattr(ps,p))
261  return newMax

References Config.Process.defaultMaxEvents_().

Referenced by Config.Process.__setattr__().

◆ __updateOptions()

def Config.Process.__updateOptions (   self,
  opt 
)
private

Definition at line 240 of file Config.py.

240  def __updateOptions(self,opt):
241  newOpts = self.defaultOptions_()
242  if isinstance(opt,dict):
243  for k,v in six.iteritems(opt):
244  setattr(newOpts,k,v)
245  else:
246  for p in opt.parameters_():
247  setattr(newOpts, p, getattr(opt,p))
248  return newOpts

References Config.Process.defaultOptions_().

Referenced by Config.Process.__setattr__().

◆ _delattrFromSetattr()

def Config.Process._delattrFromSetattr (   self,
  name 
)
private
Similar to __delattr__ but we need different behavior when called from __setattr__

Definition at line 563 of file Config.py.

563  def _delattrFromSetattr(self,name):
564  """Similar to __delattr__ but we need different behavior when called from __setattr__"""
565  self._delHelper(name)
566  # now remove it from the process itself
567  try:
568  del self.__dict__[name]
569  except:
570  pass
571 

References Config.Process._delHelper().

Referenced by Config.Process.__setattr__().

◆ _delHelper()

def Config.Process._delHelper (   self,
  name 
)
private

Definition at line 521 of file Config.py.

521  def _delHelper(self,name):
522  if not hasattr(self,name):
523  raise KeyError('process does not know about '+name)
524  elif name.startswith('_Process__'):
525  raise ValueError('this attribute cannot be deleted')
526 
527  # we have to remove it from all dictionaries/registries
528  dicts = [item for item in self.__dict__.values() if (isinstance(item, dict) or isinstance(item, DictTypes.SortedKeysDict))]
529  for reg in dicts:
530  if name in reg: del reg[name]
531  # if it was a labelable object, the label needs to be removed
532  obj = getattr(self,name)
533  if isinstance(obj,_Labelable):
534  obj.setLabel(None)
535  if isinstance(obj,Service):
536  obj._inProcess = False
537 

References contentValuesCheck.values.

Referenced by Config.Process.__delattr__(), and Config.Process._delattrFromSetattr().

◆ _dumpConfigESPrefers()

def Config.Process._dumpConfigESPrefers (   self,
  options 
)
private

Definition at line 825 of file Config.py.

825  def _dumpConfigESPrefers(self, options):
826  result = ''
827  for item in six.itervalues(self.es_prefers_()):
828  result +=options.indentation()+'es_prefer '+item.targetLabel_()+' = '+item.dumpConfig(options)
829  return result
830 

References Config.Process.es_prefers_().

Referenced by Config.Process.dumpConfig().

◆ _dumpConfigNamedList()

def Config.Process._dumpConfigNamedList (   self,
  items,
  typeName,
  options 
)
private

Definition at line 739 of file Config.py.

739  def _dumpConfigNamedList(self,items,typeName,options):
740  returnValue = ''
741  for name,item in items:
742  returnValue +=options.indentation()+typeName+' '+name+' = '+item.dumpConfig(options)
743  return returnValue
744 

Referenced by Config.Process.dumpConfig().

◆ _dumpConfigOptionallyNamedList()

def Config.Process._dumpConfigOptionallyNamedList (   self,
  items,
  typeName,
  options 
)
private

Definition at line 751 of file Config.py.

751  def _dumpConfigOptionallyNamedList(self,items,typeName,options):
752  returnValue = ''
753  for name,item in items:
754  if name == item.type_():
755  name = ''
756  returnValue +=options.indentation()+typeName+' '+name+' = '+item.dumpConfig(options)
757  return returnValue
758 

Referenced by Config.Process.dumpConfig().

◆ _dumpConfigUnnamedList()

def Config.Process._dumpConfigUnnamedList (   self,
  items,
  typeName,
  options 
)
private

Definition at line 745 of file Config.py.

745  def _dumpConfigUnnamedList(self,items,typeName,options):
746  returnValue = ''
747  for name,item in items:
748  returnValue +=options.indentation()+typeName+' = '+item.dumpConfig(options)
749  return returnValue
750 

Referenced by Config.Process.dumpConfig().

◆ _dumpPython()

def Config.Process._dumpPython (   self,
  d,
  options 
)
private

Definition at line 943 of file Config.py.

943  def _dumpPython(self, d, options):
944  result = ''
945  for name, value in sorted(six.iteritems(d)):
946  result += value.dumpPythonAs(name,options)+'\n'
947  return result
948 

Referenced by Config.Process.dumpPython().

◆ _dumpPythonList()

def Config.Process._dumpPythonList (   self,
  d,
  options 
)
private

Definition at line 837 of file Config.py.

837  def _dumpPythonList(self, d, options):
838  returnValue = ''
839  if isinstance(d, DictTypes.SortedKeysDict):
840  for name,item in d.items():
841  returnValue +='process.'+name+' = '+item.dumpPython(options)+'\n\n'
842  else:
843  for name,item in sorted(d.items()):
844  returnValue +='process.'+name+' = '+item.dumpPython(options)+'\n\n'
845  return returnValue
846 

Referenced by Config.Process.dumpPython().

◆ _dumpPythonSubProcesses()

def Config.Process._dumpPythonSubProcesses (   self,
  l,
  options 
)
private

Definition at line 831 of file Config.py.

831  def _dumpPythonSubProcesses(self, l, options):
832  returnValue = ''
833  for item in l:
834  returnValue += item.dumpPython(options)+'\n\n'
835  return returnValue
836 

Referenced by Config.Process.dumpPython().

◆ _findPreferred()

def Config.Process._findPreferred (   self,
  esname,
  d,
args,
**  kargs 
)
private

Definition at line 1378 of file Config.py.

1378  def _findPreferred(self, esname, d,*args,**kargs):
1379  # is esname a name in the dictionary?
1380  if esname in d:
1381  typ = d[esname].type_()
1382  if typ == esname:
1383  self.__setattr__( esname+"_prefer", ESPrefer(typ,*args,**kargs) )
1384  else:
1385  self.__setattr__( esname+"_prefer", ESPrefer(typ, esname,*args,**kargs) )
1386  return True
1387  else:
1388  # maybe it's an unnamed ESModule?
1389  found = False
1390  for name, value in six.iteritems(d):
1391  if value.type_() == esname:
1392  if found:
1393  raise RuntimeError("More than one ES module for "+esname)
1394  found = True
1395  self.__setattr__(esname+"_prefer", ESPrefer(d[esname].type_()) )
1396  return found
1397 
1398 

References psClasses.BuildTreeNode.__setattr__(), Config.Process.__setattr__(), and Config.FilteredStream.__setattr__.

◆ _insertInto()

def Config.Process._insertInto (   self,
  parameterSet,
  itemDict 
)
private

Definition at line 1086 of file Config.py.

1086  def _insertInto(self, parameterSet, itemDict):
1087  for name,value in six.iteritems(itemDict):
1088  value.insertInto(parameterSet, name)

◆ _insertManyInto()

def Config.Process._insertManyInto (   self,
  parameterSet,
  label,
  itemDict,
  tracked 
)
private

Definition at line 1096 of file Config.py.

1096  def _insertManyInto(self, parameterSet, label, itemDict, tracked):
1097  l = []
1098  for name,value in six.iteritems(itemDict):
1099  value.appendToProcessDescList_(l, name)
1100  value.insertInto(parameterSet, name)
1101  # alphabetical order is easier to compare with old language
1102  l.sort()
1103  parameterSet.addVString(tracked, label, l)

◆ _insertOneInto()

def Config.Process._insertOneInto (   self,
  parameterSet,
  label,
  item,
  tracked 
)
private

Definition at line 1089 of file Config.py.

1089  def _insertOneInto(self, parameterSet, label, item, tracked):
1090  vitems = []
1091  if not item == None:
1092  newlabel = item.nameInProcessDesc_(label)
1093  vitems = [newlabel]
1094  item.insertInto(parameterSet, newlabel)
1095  parameterSet.addVString(tracked, label, vitems)

◆ _insertPaths()

def Config.Process._insertPaths (   self,
  processPSet,
  nodeVisitor 
)
private

Definition at line 1127 of file Config.py.

1127  def _insertPaths(self, processPSet, nodeVisitor):
1128  scheduledPaths = []
1129  triggerPaths = []
1130  endpaths = []
1131  if self.schedule_() == None:
1132  # make one from triggerpaths & endpaths
1133  for name in self.paths_():
1134  scheduledPaths.append(name)
1135  triggerPaths.append(name)
1136  for name in self.endpaths_():
1137  scheduledPaths.append(name)
1138  endpaths.append(name)
1139  else:
1140  for path in self.schedule_():
1141  pathname = path.label_()
1142  scheduledPaths.append(pathname)
1143  if pathname in self.endpaths_():
1144  endpaths.append(pathname)
1145  else:
1146  triggerPaths.append(pathname)
1147  for task in self.schedule_()._tasks:
1148  task.resolve(self.__dict__)
1149  scheduleTaskValidator = ScheduleTaskValidator()
1150  task.visit(scheduleTaskValidator)
1151  task.visit(nodeVisitor)
1152  processPSet.addVString(True, "@end_paths", endpaths)
1153  processPSet.addVString(True, "@paths", scheduledPaths)
1154  # trigger_paths are a little different
1155  p = processPSet.newPSet()
1156  p.addVString(True, "@trigger_paths", triggerPaths)
1157  processPSet.addPSet(True, "@trigger_paths", p)
1158  # add all these paths
1159  pathValidator = PathValidator()
1160  endpathValidator = EndPathValidator()
1161  decoratedList = []
1162  lister = DecoratedNodeNameVisitor(decoratedList)
1163  pathCompositeVisitor = CompositeVisitor(pathValidator, nodeVisitor, lister)
1164  endpathCompositeVisitor = CompositeVisitor(endpathValidator, nodeVisitor, lister)
1165  for triggername in triggerPaths:
1166  iPath = self.paths_()[triggername]
1167  iPath.resolve(self.__dict__)
1168  pathValidator.setLabel(triggername)
1169  lister.initialize()
1170  iPath.visit(pathCompositeVisitor)
1171  iPath.insertInto(processPSet, triggername, decoratedList)
1172  for endpathname in endpaths:
1173  iEndPath = self.endpaths_()[endpathname]
1174  iEndPath.resolve(self.__dict__)
1175  endpathValidator.setLabel(endpathname)
1176  lister.initialize()
1177  iEndPath.visit(endpathCompositeVisitor)
1178  iEndPath.insertInto(processPSet, endpathname, decoratedList)
1179  processPSet.addVString(False, "@filters_on_endpaths", endpathValidator.filtersOnEndpaths)
1180 

References Config.Process.endpaths_(), FastTimerService::PlotsPerProcess.endpaths_, edm::MainParameterSet.paths_, edm::HLTGlobalStatus.paths_, heppy::TriggerBitChecker.paths_, edm::PathsAndConsumesOfModules.paths_, ProcessCallGraph::ProcessType.paths_, pat::TriggerEvent.paths_, HLTPerformanceInfo.paths_, Config.Process.paths_(), FastTimerService::PlotsPerProcess.paths_, EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.schedule_, and edm::EventProcessor.schedule_.

◆ _insertSubProcessesInto()

def Config.Process._insertSubProcessesInto (   self,
  parameterSet,
  label,
  itemList,
  tracked 
)
private

Definition at line 1114 of file Config.py.

1114  def _insertSubProcessesInto(self, parameterSet, label, itemList, tracked):
1115  l = []
1116  subprocs = []
1117  for value in itemList:
1118  name = value.getProcessName()
1119  newLabel = value.nameInProcessDesc_(name)
1120  l.append(newLabel)
1121  pset = value.getSubProcessPSet(parameterSet)
1122  subprocs.append(pset)
1123  # alphabetical order is easier to compare with old language
1124  l.sort()
1125  parameterSet.addVString(tracked, label, l)
1126  parameterSet.addVPSet(False,"subProcesses",subprocs)

◆ _insertSwitchProducersInto()

def Config.Process._insertSwitchProducersInto (   self,
  parameterSet,
  labelModules,
  labelAliases,
  itemDict,
  tracked 
)
private

Definition at line 1104 of file Config.py.

1104  def _insertSwitchProducersInto(self, parameterSet, labelModules, labelAliases, itemDict, tracked):
1105  modules = parameterSet.getVString(tracked, labelModules)
1106  aliases = parameterSet.getVString(tracked, labelAliases)
1107  for name,value in six.iteritems(itemDict):
1108  value.appendToProcessDescLists_(modules, aliases, name)
1109  value.insertInto(parameterSet, name)
1110  modules.sort()
1111  aliases.sort()
1112  parameterSet.addVString(tracked, labelModules, modules)
1113  parameterSet.addVString(tracked, labelAliases, aliases)

◆ _itemsInDependencyOrder()

def Config.Process._itemsInDependencyOrder (   self,
  processDictionaryOfItems 
)
private

Definition at line 886 of file Config.py.

886  def _itemsInDependencyOrder(self, processDictionaryOfItems):
887  # The items can be Sequences or Tasks and the input
888  # argument should either be the dictionary of sequences
889  # or the dictionary of tasks from the process.
890 
891  returnValue=DictTypes.SortedKeysDict()
892 
893  # For each item, see what other items it depends upon
894  # For our purpose here, an item depends on the items it contains.
895  dependencies = {}
896  for label,item in six.iteritems(processDictionaryOfItems):
897  containedItems = []
898  if isinstance(item, Task):
899  v = TaskVisitor(containedItems)
900  else:
901  v = SequenceVisitor(containedItems)
902  try:
903  item.visit(v)
904  except RuntimeError:
905  if isinstance(item, Task):
906  raise RuntimeError("Failed in a Task visitor. Probably " \
907  "a circular dependency discovered in Task with label " + label)
908  else:
909  raise RuntimeError("Failed in a Sequence visitor. Probably a " \
910  "circular dependency discovered in Sequence with label " + label)
911  for containedItem in containedItems:
912  # Check for items that both have labels and are not in the process.
913  # This should not normally occur unless someone explicitly assigns a
914  # label without putting the item in the process (which should not ever
915  # be done). We check here because this problem could cause the code
916  # in the 'while' loop below to go into an infinite loop.
917  if containedItem.hasLabel_():
918  testItem = processDictionaryOfItems.get(containedItem.label_())
919  if testItem is None or containedItem != testItem:
920  if isinstance(item, Task):
921  raise RuntimeError("Task has a label, but using its label to get an attribute" \
922  " from the process yields a different object or None\n"+
923  "label = " + containedItem.label_())
924  else:
925  raise RuntimeError("Sequence has a label, but using its label to get an attribute" \
926  " from the process yields a different object or None\n"+
927  "label = " + containedItem.label_())
928  dependencies[label]=[dep.label_() for dep in containedItems if dep.hasLabel_()]
929 
930  # keep looping until we get rid of all dependencies
931  while dependencies:
932  oldDeps = dict(dependencies)
933  for label,deps in six.iteritems(oldDeps):
934  if len(deps)==0:
935  returnValue[label]=processDictionaryOfItems[label]
936  #remove this as a dependency for all other tasks
937  del dependencies[label]
938  for lb2,deps2 in six.iteritems(dependencies):
939  while deps2.count(label):
940  deps2.remove(label)
941  return returnValue
942 

Referenced by Config.Process.dumpPython(), and Config.Process.splitPython().

◆ _okToPlace()

def Config.Process._okToPlace (   self,
  name,
  mod,
  d 
)
private

Definition at line 587 of file Config.py.

587  def _okToPlace(self, name, mod, d):
588  if not self.__InExtendCall:
589  # if going
590  return True
591  elif not self.__isStrict:
592  return True
593  elif name in d:
594  # if there's an old copy, and the new one
595  # hasn't been modified, we're done. Still
596  # not quite safe if something has been defined twice.
597  # Need to add checks
598  if mod._isModified:
599  if d[name]._isModified:
600  return False
601  else:
602  return True
603  else:
604  return True
605  else:
606  return True
607 

References Config.Process.__isStrict.

Referenced by Config.Process.__setattr__(), and Config.Process._place().

◆ _place()

def Config.Process._place (   self,
  name,
  mod,
  d 
)
private

Definition at line 608 of file Config.py.

608  def _place(self, name, mod, d):
609  if self._okToPlace(name, mod, d):
610  if self.__isStrict and isinstance(mod, _ModuleSequenceType):
611  d[name] = mod._postProcessFixup(self._cloneToObjectDict)
612  else:
613  d[name] = mod
614  if isinstance(mod,_Labelable):
615  self.__setObjectLabel(mod, name)

References Config.Process.__isStrict, Config.Process.__setObjectLabel(), and Config.Process._okToPlace().

Referenced by Config.Process._placeAlias(), Config.Process._placeAnalyzer(), Config.Process._placeEndPath(), Config.Process._placeESPrefer(), Config.Process._placeESProducer(), Config.Process._placeESSource(), Config.Process._placeFilter(), Config.Process._placeOutputModule(), Config.Process._placePath(), Config.Process._placeProducer(), Config.Process._placePSet(), Config.Process._placeSequence(), Config.Process._placeService(), Config.Process._placeSwitchProducer(), Config.Process._placeTask(), Config.Process._placeVPSet(), and Config.Process.setPartialSchedule_().

◆ _placeAlias()

def Config.Process._placeAlias (   self,
  name,
  mod 
)
private

Definition at line 652 of file Config.py.

652  def _placeAlias(self,name,mod):
653  self._place(name, mod, self.__aliases)

References Config.Process._place().

◆ _placeAnalyzer()

def Config.Process._placeAnalyzer (   self,
  name,
  mod 
)
private

Definition at line 624 of file Config.py.

624  def _placeAnalyzer(self,name,mod):
625  self._place(name, mod, self.__analyzers)

References Config.Process._place().

◆ _placeEndPath()

def Config.Process._placeEndPath (   self,
  name,
  mod 
)
private

Definition at line 633 of file Config.py.

633  def _placeEndPath(self,name,mod):
634  self._validateSequence(mod, name)
635  try:
636  self._place(name, mod, self.__endpaths)
637  except ModuleCloneError as msg:
638  context = format_outerframe(4)
639  raise Exception("%sThe module %s in endpath %s is unknown to the process %s." %(context, msg, name, self._Process__name))

References Config.Process._place(), Config.Process._validateSequence(), and ExceptionHandling.format_outerframe().

◆ _placeESPrefer()

def Config.Process._placeESPrefer (   self,
  name,
  mod 
)
private

Definition at line 645 of file Config.py.

645  def _placeESPrefer(self,name,mod):
646  self._place(name, mod, self.__esprefers)

References Config.Process._place().

◆ _placeESProducer()

def Config.Process._placeESProducer (   self,
  name,
  mod 
)
private

Definition at line 643 of file Config.py.

643  def _placeESProducer(self,name,mod):
644  self._place(name, mod, self.__esproducers)

References Config.Process._place().

◆ _placeESSource()

def Config.Process._placeESSource (   self,
  name,
  mod 
)
private

Definition at line 647 of file Config.py.

647  def _placeESSource(self,name,mod):
648  self._place(name, mod, self.__essources)

References Config.Process._place().

◆ _placeFilter()

def Config.Process._placeFilter (   self,
  name,
  mod 
)
private

Definition at line 622 of file Config.py.

622  def _placeFilter(self,name,mod):
623  self._place(name, mod, self.__filters)

References Config.Process._place().

◆ _placeLooper()

def Config.Process._placeLooper (   self,
  name,
  mod 
)
private

Definition at line 666 of file Config.py.

666  def _placeLooper(self,name,mod):
667  if name != 'looper':
668  raise ValueError("The label '"+name+"' can not be used for a Looper. Only 'looper' is allowed.")
669  self.__dict__['_Process__looper'] = mod
670  self.__dict__[mod.type_()] = mod

Referenced by Config.Process.setLooper_().

◆ _placeOutputModule()

def Config.Process._placeOutputModule (   self,
  name,
  mod 
)
private

Definition at line 616 of file Config.py.

616  def _placeOutputModule(self,name,mod):
617  self._place(name, mod, self.__outputmodules)

References Config.Process._place().

◆ _placePath()

def Config.Process._placePath (   self,
  name,
  mod 
)
private

Definition at line 626 of file Config.py.

626  def _placePath(self,name,mod):
627  self._validateSequence(mod, name)
628  try:
629  self._place(name, mod, self.__paths)
630  except ModuleCloneError as msg:
631  context = format_outerframe(4)
632  raise Exception("%sThe module %s in path %s is unknown to the process %s." %(context, msg, name, self._Process__name))

References Config.Process._place(), Config.Process._validateSequence(), and ExceptionHandling.format_outerframe().

◆ _placeProducer()

def Config.Process._placeProducer (   self,
  name,
  mod 
)
private

Definition at line 618 of file Config.py.

618  def _placeProducer(self,name,mod):
619  self._place(name, mod, self.__producers)

References Config.Process._place().

◆ _placePSet()

def Config.Process._placePSet (   self,
  name,
  mod 
)
private

Definition at line 654 of file Config.py.

654  def _placePSet(self,name,mod):
655  self._place(name, mod, self.__psets)

References Config.Process._place().

◆ _placeSequence()

def Config.Process._placeSequence (   self,
  name,
  mod 
)
private

Definition at line 640 of file Config.py.

640  def _placeSequence(self,name,mod):
641  self._validateSequence(mod, name)
642  self._place(name, mod, self.__sequences)

References Config.Process._place(), and Config.Process._validateSequence().

◆ _placeService()

def Config.Process._placeService (   self,
  typeName,
  mod 
)
private

Definition at line 676 of file Config.py.

676  def _placeService(self,typeName,mod):
677  self._place(typeName, mod, self.__services)
678  if typeName in self.__dict__:
679  self.__dict__[typeName]._inProcess = False
680  self.__dict__[typeName]=mod

References Config.Process._place().

◆ _placeSource()

def Config.Process._placeSource (   self,
  name,
  mod 
)
private
Allow the source to be referenced by 'source' or by type name

Definition at line 658 of file Config.py.

658  def _placeSource(self,name,mod):
659  """Allow the source to be referenced by 'source' or by type name"""
660  if name != 'source':
661  raise ValueError("The label '"+name+"' can not be used for a Source. Only 'source' is allowed.")
662  if self.__dict__['_Process__source'] is not None :
663  del self.__dict__[self.__dict__['_Process__source'].type_()]
664  self.__dict__['_Process__source'] = mod
665  self.__dict__[mod.type_()] = mod

Referenced by Config.Process.setSource_().

◆ _placeSubProcess()

def Config.Process._placeSubProcess (   self,
  name,
  mod 
)
private

Definition at line 671 of file Config.py.

671  def _placeSubProcess(self,name,mod):
672  self.__dict__['_Process__subProcess'] = mod
673  self.__dict__[mod.type_()] = mod

◆ _placeSwitchProducer()

def Config.Process._placeSwitchProducer (   self,
  name,
  mod 
)
private

Definition at line 620 of file Config.py.

620  def _placeSwitchProducer(self,name,mod):
621  self._place(name, mod, self.__switchproducers)

References Config.Process._place().

◆ _placeTask()

def Config.Process._placeTask (   self,
  name,
  task 
)
private

Definition at line 649 of file Config.py.

649  def _placeTask(self,name,task):
650  self._validateTask(task, name)
651  self._place(name, task, self.__tasks)

References Config.Process._place(), and Config.Process._validateTask().

◆ _placeVPSet()

def Config.Process._placeVPSet (   self,
  name,
  mod 
)
private

Definition at line 656 of file Config.py.

656  def _placeVPSet(self,name,mod):
657  self._place(name, mod, self.__vpsets)

References Config.Process._place().

◆ _pruneModules()

def Config.Process._pruneModules (   self,
  d,
  scheduledNames 
)
private

Definition at line 1256 of file Config.py.

1256  def _pruneModules(self, d, scheduledNames):
1257  moduleNames = set(d.keys())
1258  junk = moduleNames - scheduledNames
1259  for name in junk:
1260  delattr(self, name)
1261  return junk
1262 

Referenced by Config.Process.prune().

◆ _replaceInSchedule()

def Config.Process._replaceInSchedule (   self,
  label,
  new 
)
private

Definition at line 1075 of file Config.py.

1075  def _replaceInSchedule(self, label, new):
1076  if self.schedule_() == None:
1077  return
1078  old = getattr(self,label)
1079  for task in self.schedule_()._tasks:
1080  task.replace(old, new)

References EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.schedule_, and edm::EventProcessor.schedule_.

Referenced by Config.Process.__delattr__(), and Config.Process.__setattr__().

◆ _replaceInSequences()

def Config.Process._replaceInSequences (   self,
  label,
  new 
)
private

Definition at line 1056 of file Config.py.

1056  def _replaceInSequences(self, label, new):
1057  old = getattr(self,label)
1058  #TODO - replace by iterator concatenation
1059  #to ovoid dependency problems between sequences, first modify
1060  # process known sequences to do a non-recursive change. Then do
1061  # a recursive change to get cases where a sub-sequence unknown to
1062  # the process has the item to be replaced
1063  for sequenceable in six.itervalues(self.sequences):
1064  sequenceable._replaceIfHeldDirectly(old,new)
1065  for sequenceable in six.itervalues(self.sequences):
1066  sequenceable.replace(old,new)
1067  for sequenceable in six.itervalues(self.paths):
1068  sequenceable.replace(old,new)
1069  for sequenceable in six.itervalues(self.endpaths):
1070  sequenceable.replace(old,new)

References Config.Process.endpaths, cms::DDSpecPar.paths, Config.Process.paths, and Config.Process.sequences.

Referenced by Config.Process.__delattr__(), and Config.Process.__setattr__().

◆ _replaceInTasks()

def Config.Process._replaceInTasks (   self,
  label,
  new 
)
private

Definition at line 1071 of file Config.py.

1071  def _replaceInTasks(self, label, new):
1072  old = getattr(self,label)
1073  for task in six.itervalues(self.tasks):
1074  task.replace(old, new)

References Config.Process.tasks.

Referenced by Config.Process.__delattr__(), and Config.Process.__setattr__().

◆ _splitPython()

def Config.Process._splitPython (   self,
  subfolder,
  d,
  options 
)
private

Definition at line 949 of file Config.py.

949  def _splitPython(self, subfolder, d, options):
950  result = {}
951  for name, value in sorted(six.iteritems(d)):
952  result[name] = subfolder, value.dumpPythonAs(name, options) + '\n'
953  return result
954 

Referenced by Config.Process.splitPython().

◆ _splitPythonList()

def Config.Process._splitPythonList (   self,
  subfolder,
  d,
  options 
)
private

Definition at line 847 of file Config.py.

847  def _splitPythonList(self, subfolder, d, options):
848  parts = DictTypes.SortedKeysDict()
849  for name, item in d.items() if isinstance(d, DictTypes.SortedKeysDict) else sorted(d.items()):
850  code = ''
851  dependencies = item.directDependencies()
852  for module_subfolder, module in dependencies:
853  module = module + '_cfi'
854  if options.useSubdirectories and module_subfolder:
855  module = module_subfolder + '.' + module
856  if options.targetDirectory is not None:
857  if options.useSubdirectories and subfolder:
858  module = '..' + module
859  else:
860  module = '.' + module
861  code += 'from ' + module + ' import *\n'
862  if dependencies:
863  code += '\n'
864  code += name + ' = ' + item.dumpPython(options)
865  parts[name] = subfolder, code
866  return parts
867 

Referenced by Config.Process.splitPython().

◆ _validateSequence()

def Config.Process._validateSequence (   self,
  sequence,
  label 
)
private

Definition at line 868 of file Config.py.

868  def _validateSequence(self, sequence, label):
869  # See if every module has been inserted into the process
870  try:
871  l = set()
872  visitor = NodeNameVisitor(l)
873  sequence.visit(visitor)
874  except:
875  raise RuntimeError("An entry in sequence "+label + ' has no label')
876 

Referenced by Config.Process._placeEndPath(), Config.Process._placePath(), and Config.Process._placeSequence().

◆ _validateTask()

def Config.Process._validateTask (   self,
  task,
  label 
)
private

Definition at line 877 of file Config.py.

877  def _validateTask(self, task, label):
878  # See if every module and service has been inserted into the process
879  try:
880  l = set()
881  visitor = NodeNameVisitor(l)
882  task.visit(visitor)
883  except:
884  raise RuntimeError("An entry in task " + label + ' has not been attached to the process')
885 

Referenced by Config.Process._placeTask().

◆ add_()

def Config.Process.add_ (   self,
  value 
)
Allows addition of components that do not have to have a label, e.g. Services

Definition at line 572 of file Config.py.

572  def add_(self,value):
573  """Allows addition of components that do not have to have a label, e.g. Services"""
574  if not isinstance(value,_ConfigureComponent):
575  raise TypeError
576  if not isinstance(value,_Unlabelable):
577  raise TypeError
578  #clone the item
579  #clone the item
580  if self.__isStrict:
581  newValue =value.copy()
582  value.setIsFrozen()
583  else:
584  newValue =value
585  newValue._place('',self)
586 

References Config.Process.__isStrict.

Referenced by Config.Process.__setattr__(), and Config.Process.extend().

◆ addSubProcess()

def Config.Process.addSubProcess (   self,
  mod 
)

Definition at line 674 of file Config.py.

674  def addSubProcess(self,mod):
675  self.__subProcesses.append(mod)

References mps_setup.append.

◆ aliases_()

def Config.Process.aliases_ (   self)
returns a dict of the aliases that have been added to the Process

Definition at line 328 of file Config.py.

328  def aliases_(self):
329  """returns a dict of the aliases that have been added to the Process"""
330  return DictTypes.FixedKeysDict(self.__aliases)

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ analyzerNames()

def Config.Process.analyzerNames (   self)
Returns a string containing all the EDAnalyzer labels separated by a blank

Definition at line 155 of file Config.py.

155  def analyzerNames(self):
156  """Returns a string containing all the EDAnalyzer labels separated by a blank"""
157  return ' '.join(self.analyzers_().keys())

References HLTMuonValidator.analyzers_, Config.Process.analyzers_(), join(), and relativeConstraints.keys.

◆ analyzers_()

def Config.Process.analyzers_ (   self)
returns a dict of the analyzers that have been added to the Process

Definition at line 269 of file Config.py.

269  def analyzers_(self):
270  """returns a dict of the analyzers that have been added to the Process"""
271  return DictTypes.FixedKeysDict(self.__analyzers)

Referenced by Config.Process.analyzerNames(), Config.Process.dumpConfig(), Config.Process.dumpPython(), Config.Process.prune(), and Config.Process.splitPython().

◆ defaultMaxEvents_()

def Config.Process.defaultMaxEvents_ ( )
static

Definition at line 250 of file Config.py.

250  def defaultMaxEvents_():
251  return untracked.PSet(input=optional.untracked.int32,
252  output=optional.untracked.allowed(int32,PSet))

Referenced by Config.Process.__updateMaxEvents().

◆ defaultMaxLuminosityBlocks_()

def Config.Process.defaultMaxLuminosityBlocks_ ( )
static

Definition at line 263 of file Config.py.

263  def defaultMaxLuminosityBlocks_():
264  return untracked.PSet(input=untracked.int32(-1))

◆ defaultOptions_()

def Config.Process.defaultOptions_ ( )
static

Definition at line 214 of file Config.py.

214  def defaultOptions_():
215  return untracked.PSet(numberOfThreads = untracked.uint32(1),
216  numberOfStreams = untracked.uint32(0),
217  numberOfConcurrentRuns = untracked.uint32(1),
218  numberOfConcurrentLuminosityBlocks = untracked.uint32(1),
219  eventSetup = untracked.PSet(
220  numberOfConcurrentIOVs = untracked.uint32(1),
221  forceNumberOfConcurrentIOVs = untracked.PSet(
222  allowAnyLabel_ = required.untracked.uint32
223  )
224  ),
225  wantSummary = untracked.bool(False),
226  fileMode = untracked.string('FULLMERGE'),
227  forceEventSetupCacheClearOnNewRun = untracked.bool(False),
228  throwIfIllegalParameter = untracked.bool(True),
229  printDependencies = untracked.bool(False),
230  sizeOfStackForThreadsInKB = optional.untracked.uint32,
231  Rethrow = untracked.vstring(),
232  SkipEvent = untracked.vstring(),
233  FailPath = untracked.vstring(),
234  IgnoreCompletely = untracked.vstring(),
235  canDeleteEarly = untracked.vstring(),
236  allowUnscheduled = obsolete.untracked.bool,
237  emptyRunLumiMode = obsolete.untracked.string,
238  makeTriggerResults = obsolete.untracked.bool
239  )

Referenced by Config.Process.__updateOptions().

◆ dumpConfig()

def Config.Process.dumpConfig (   self,
  options = PrintOptions() 
)
return a string containing the equivalent process defined using the old configuration language

Definition at line 759 of file Config.py.

759  def dumpConfig(self, options=PrintOptions()):
760  """return a string containing the equivalent process defined using the old configuration language"""
761  config = "process "+self.__name+" = {\n"
762  options.indent()
763  if self.source_():
764  config += options.indentation()+"source = "+self.source_().dumpConfig(options)
765  if self.looper_():
766  config += options.indentation()+"looper = "+self.looper_().dumpConfig(options)
767 
768  config+=self._dumpConfigNamedList(self.subProcesses_(),
769  'subProcess',
770  options)
771  config+=self._dumpConfigNamedList(six.iteritems(self.producers_()),
772  'module',
773  options)
774  config+=self._dumpConfigNamedList(six.iteritems(self.switchProducers_()),
775  'module',
776  options)
777  config+=self._dumpConfigNamedList(six.iteritems(self.filters_()),
778  'module',
779  options)
780  config+=self._dumpConfigNamedList(six.iteritems(self.analyzers_()),
781  'module',
782  options)
783  config+=self._dumpConfigNamedList(six.iteritems(self.outputModules_()),
784  'module',
785  options)
786  config+=self._dumpConfigNamedList(six.iteritems(self.sequences_()),
787  'sequence',
788  options)
789  config+=self._dumpConfigNamedList(six.iteritems(self.paths_()),
790  'path',
791  options)
792  config+=self._dumpConfigNamedList(six.iteritems(self.endpaths_()),
793  'endpath',
794  options)
795  config+=self._dumpConfigUnnamedList(six.iteritems(self.services_()),
796  'service',
797  options)
798  config+=self._dumpConfigNamedList(six.iteritems(self.aliases_()),
799  'alias',
800  options)
801  config+=self._dumpConfigOptionallyNamedList(
802  six.iteritems(self.es_producers_()),
803  'es_module',
804  options)
805  config+=self._dumpConfigOptionallyNamedList(
806  six.iteritems(self.es_sources_()),
807  'es_source',
808  options)
809  config += self._dumpConfigESPrefers(options)
810  for name,item in six.iteritems(self.psets):
811  config +=options.indentation()+item.configTypeName()+' '+name+' = '+item.configValue(options)
812  for name,item in six.iteritems(self.vpsets):
813  config +=options.indentation()+'VPSet '+name+' = '+item.configValue(options)
814  if self.schedule:
815  pathNames = [p.label_() for p in self.schedule]
816  config +=options.indentation()+'schedule = {'+','.join(pathNames)+'}\n'
817 
818 # config+=self._dumpConfigNamedList(six.iteritems(self.vpsets),
819 # 'VPSet',
820 # options)
821  config += "}\n"
822  options.unindent()
823  return config
824 

References dataset.Dataset.__name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name, Config.Process._dumpConfigESPrefers(), Config.Process._dumpConfigNamedList(), Config.Process._dumpConfigOptionallyNamedList(), Config.Process._dumpConfigUnnamedList(), Config.Process.aliases_(), HLTMuonValidator.analyzers_, Config.Process.analyzers_(), Config.Process.endpaths_(), FastTimerService::PlotsPerProcess.endpaths_, Config.Process.es_producers_(), Config.Process.es_sources_(), pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, Config.Process.filters_(), cms::DDFilteredView.filters_, FilterSelection.filters_, FilterSelections.filters_, join(), Config.Process.looper_(), edm::EventProcessor.looper_, Config.Process.outputModules_(), edm::MainParameterSet.paths_, edm::HLTGlobalStatus.paths_, heppy::TriggerBitChecker.paths_, edm::PathsAndConsumesOfModules.paths_, ProcessCallGraph::ProcessType.paths_, pat::TriggerEvent.paths_, HLTPerformanceInfo.paths_, Config.Process.paths_(), FastTimerService::PlotsPerProcess.paths_, pf2pat::EventHypothesis.producers_, Config.Process.producers_(), Config.Process.psets, ConfigBuilder.ConfigBuilder.schedule, Config.Process.schedule, Config.Process.sequences_(), edm::ProcessDesc.services_, Config.Process.services_(), ecaldqm::DBWriterWorker.source_, SiStripFedCablingBuilderFromDb.source_, jsoncollector::DataPoint.source_, sistrip::SpyEventMatcher.source_, ProcessCallGraph.source_, Config.Process.source_(), edm::InputSource::EventSourceSentry.source_, edm::InputSource::LumiSourceSentry.source_, edm::InputSource::RunSourceSentry.source_, Config.Process.subProcesses_(), edm::SubProcess.subProcesses_, edm::EventProcessor.subProcesses_, Config.Process.switchProducers_(), and Config.Process.vpsets.

Referenced by Types.SecSource.configValue().

◆ dumpPython()

def Config.Process.dumpPython (   self,
  options = PrintOptions() 
)
return a string containing the equivalent process defined using python

Definition at line 955 of file Config.py.

955  def dumpPython(self, options=PrintOptions()):
956  """return a string containing the equivalent process defined using python"""
957  specialImportRegistry._reset()
958  header = "import FWCore.ParameterSet.Config as cms"
959  result = "process = cms.Process(\""+self.__name+"\")\n\n"
960  if self.source_():
961  result += "process.source = "+self.source_().dumpPython(options)
962  if self.looper_():
963  result += "process.looper = "+self.looper_().dumpPython()
964  result+=self._dumpPythonList(self.psets, options)
965  result+=self._dumpPythonList(self.vpsets, options)
966  result+=self._dumpPythonSubProcesses(self.subProcesses_(), options)
967  result+=self._dumpPythonList(self.producers_(), options)
968  result+=self._dumpPythonList(self.switchProducers_(), options)
969  result+=self._dumpPythonList(self.filters_() , options)
970  result+=self._dumpPythonList(self.analyzers_(), options)
971  result+=self._dumpPythonList(self.outputModules_(), options)
972  result+=self._dumpPythonList(self.services_(), options)
973  result+=self._dumpPythonList(self.es_producers_(), options)
974  result+=self._dumpPythonList(self.es_sources_(), options)
975  result+=self._dumpPython(self.es_prefers_(), options)
976  result+=self._dumpPythonList(self._itemsInDependencyOrder(self.tasks), options)
977  result+=self._dumpPythonList(self._itemsInDependencyOrder(self.sequences), options)
978  result+=self._dumpPythonList(self.paths_(), options)
979  result+=self._dumpPythonList(self.endpaths_(), options)
980  result+=self._dumpPythonList(self.aliases_(), options)
981  if not self.schedule_() == None:
982  result += 'process.schedule = ' + self.schedule.dumpPython(options)
983  imports = specialImportRegistry.getSpecialImports()
984  if len(imports) > 0:
985  header += "\n" + "\n".join(imports)
986  header += "\n\n"
987  return header+result
988 

References dataset.Dataset.__name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name, Config.Process._dumpPython(), Config.Process._dumpPythonList(), Config.Process._dumpPythonSubProcesses(), Config.Process._itemsInDependencyOrder(), Config.Process.aliases_(), HLTMuonValidator.analyzers_, Config.Process.analyzers_(), Config.Process.endpaths_(), FastTimerService::PlotsPerProcess.endpaths_, Config.Process.es_prefers_(), Config.Process.es_producers_(), Config.Process.es_sources_(), pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, Config.Process.filters_(), cms::DDFilteredView.filters_, FilterSelection.filters_, FilterSelections.filters_, join(), Config.Process.looper_(), edm::EventProcessor.looper_, Config.Process.outputModules_(), edm::MainParameterSet.paths_, edm::HLTGlobalStatus.paths_, heppy::TriggerBitChecker.paths_, edm::PathsAndConsumesOfModules.paths_, ProcessCallGraph::ProcessType.paths_, pat::TriggerEvent.paths_, HLTPerformanceInfo.paths_, Config.Process.paths_(), FastTimerService::PlotsPerProcess.paths_, pf2pat::EventHypothesis.producers_, Config.Process.producers_(), Config.Process.psets, ConfigBuilder.ConfigBuilder.schedule, Config.Process.schedule, EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.schedule_, edm::EventProcessor.schedule_, Config.Process.sequences, edm::ProcessDesc.services_, Config.Process.services_(), ecaldqm::DBWriterWorker.source_, SiStripFedCablingBuilderFromDb.source_, jsoncollector::DataPoint.source_, sistrip::SpyEventMatcher.source_, ProcessCallGraph.source_, Config.Process.source_(), edm::InputSource::EventSourceSentry.source_, edm::InputSource::LumiSourceSentry.source_, edm::InputSource::RunSourceSentry.source_, Config.Process.subProcesses_(), edm::SubProcess.subProcesses_, edm::EventProcessor.subProcesses_, Config.Process.switchProducers_(), Config.Process.tasks, and Config.Process.vpsets.

Referenced by Modules.SwitchProducer.__addParameter(), Types._AllowedParameterTypes.__init__(), Mixins._ParameterTypeBase.__repr__(), Mixins._Parameterizable.__repr__(), Mixins._ValidatingParameterListBase.__repr__(), Types.VPSet.__repr__(), Mixins._Parameterizable.__setattr__(), Modules.SwitchProducer.__setattr__(), SequenceTypes.Schedule.__str__(), and Config.Process.splitPython().

◆ endpaths_()

def Config.Process.endpaths_ (   self)
returns a dict of the endpaths that have been added to the Process

Definition at line 281 of file Config.py.

281  def endpaths_(self):
282  """returns a dict of the endpaths that have been added to the Process"""
283  return DictTypes.SortedAndFixedKeysDict(self.__endpaths)

Referenced by Config.Process._insertPaths(), Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ es_prefers_()

def Config.Process.es_prefers_ (   self)
returns a dict of the es_prefers that have been added to the Process

Definition at line 324 of file Config.py.

324  def es_prefers_(self):
325  """returns a dict of the es_prefers that have been added to the Process"""
326  return DictTypes.FixedKeysDict(self.__esprefers)

Referenced by Config.Process._dumpConfigESPrefers(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ es_producers_()

def Config.Process.es_producers_ (   self)
returns a dict of the esproducers that have been added to the Process

Definition at line 316 of file Config.py.

316  def es_producers_(self):
317  """returns a dict of the esproducers that have been added to the Process"""
318  return DictTypes.FixedKeysDict(self.__esproducers)

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ es_sources_()

def Config.Process.es_sources_ (   self)
returns a the es_sources that have been added to the Process

Definition at line 320 of file Config.py.

320  def es_sources_(self):
321  """returns a the es_sources that have been added to the Process"""
322  return DictTypes.FixedKeysDict(self.__essources)

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ extend()

def Config.Process.extend (   self,
  other,
  items = () 
)
Look in other and find types that we can use

Definition at line 685 of file Config.py.

685  def extend(self,other,items=()):
686  """Look in other and find types that we can use"""
687  # enable explicit check to avoid overwriting of existing objects
688  self.__dict__['_Process__InExtendCall'] = True
689 
690  seqs = dict()
691  tasksToAttach = dict()
692  mods = []
693  for name in dir(other):
694  #'from XX import *' ignores these, and so should we.
695  if name.startswith('_'):
696  continue
697  item = getattr(other,name)
698  if name == "source" or name == "looper":
699  # In these cases 'item' could be None if the specific object was not defined
700  if item is not None:
701  self.__setattr__(name,item)
702  elif isinstance(item,_ModuleSequenceType):
703  seqs[name]=item
704  elif isinstance(item,Task):
705  tasksToAttach[name] = item
706  elif isinstance(item,_Labelable):
707  self.__setattr__(name,item)
708  if not item.hasLabel_() :
709  item.setLabel(name)
710  elif isinstance(item,Schedule):
711  self.__setattr__(name,item)
712  elif isinstance(item,_Unlabelable):
713  self.add_(item)
714  elif isinstance(item,ProcessModifier):
715  mods.append(item)
716  elif isinstance(item,ProcessFragment):
717  self.extend(item)
718 
719  #now create a sequence that uses the newly made items
720  for name,seq in six.iteritems(seqs):
721  if id(seq) not in self._cloneToObjectDict:
722  self.__setattr__(name,seq)
723  else:
724  newSeq = self._cloneToObjectDict[id(seq)]
725  self.__dict__[name]=newSeq
726  self.__setObjectLabel(newSeq, name)
727  #now put in proper bucket
728  newSeq._place(name,self)
729 
730  for name, task in six.iteritems(tasksToAttach):
731  self.__setattr__(name, task)
732 
733  #apply modifiers now that all names have been added
734  for item in mods:
735  item.apply(self)
736 
737  self.__dict__['_Process__InExtendCall'] = False
738 

References psClasses.BuildTreeNode.__setattr__(), Config.Process.__setattr__(), Config.FilteredStream.__setattr__, Config.Process.__setObjectLabel(), Config.Process.add_(), DeadROC_duringRun.dir, svgfig.SVG.extend(), Config.Process.extend(), and triggerObjects_cff.id.

Referenced by MatrixUtil.WF.__init__(), Config.Process.extend(), Config.Process.load(), and Mixins._ValidatingParameterListBase.setValue().

◆ fillProcessDesc()

def Config.Process.fillProcessDesc (   self,
  processPSet 
)
Used by the framework to convert python to C++ objects

Definition at line 1263 of file Config.py.

1263  def fillProcessDesc(self, processPSet):
1264  """Used by the framework to convert python to C++ objects"""
1265  class ServiceInjectorAdaptor(object):
1266  def __init__(self,ppset,thelist):
1267  self.__thelist = thelist
1268  self.__processPSet = ppset
1269  def addService(self,pset):
1270  self.__thelist.append(pset)
1271  def newPSet(self):
1272  return self.__processPSet.newPSet()
1273  #This adaptor is used to 'add' the method 'getTopPSet_'
1274  # to the ProcessDesc and PythonParameterSet C++ classes.
1275  # This method is needed for the PSet refToPSet_ functionality.
1276  class TopLevelPSetAcessorAdaptor(object):
1277  def __init__(self,ppset,process):
1278  self.__ppset = ppset
1279  self.__process = process
1280  def __getattr__(self,attr):
1281  return getattr(self.__ppset,attr)
1282  def getTopPSet_(self,label):
1283  return getattr(self.__process,label)
1284  def newPSet(self):
1285  return TopLevelPSetAcessorAdaptor(self.__ppset.newPSet(),self.__process)
1286  def addPSet(self,tracked,name,ppset):
1287  return self.__ppset.addPSet(tracked,name,self.__extractPSet(ppset))
1288  def addVPSet(self,tracked,name,vpset):
1289  return self.__ppset.addVPSet(tracked,name,[self.__extractPSet(x) for x in vpset])
1290  def __extractPSet(self,pset):
1291  if isinstance(pset,TopLevelPSetAcessorAdaptor):
1292  return pset.__ppset
1293  return pset
1294 
1295  self.validate()
1296  processPSet.addString(True, "@process_name", self.name_())
1297  all_modules = self.producers_().copy()
1298  all_modules.update(self.filters_())
1299  all_modules.update(self.analyzers_())
1300  all_modules.update(self.outputModules_())
1301  adaptor = TopLevelPSetAcessorAdaptor(processPSet,self)
1302  self._insertInto(adaptor, self.psets_())
1303  self._insertInto(adaptor, self.vpsets_())
1304  self._insertOneInto(adaptor, "@all_sources", self.source_(), True)
1305  self._insertOneInto(adaptor, "@all_loopers", self.looper_(), True)
1306  self._insertSubProcessesInto(adaptor, "@all_subprocesses", self.subProcesses_(), False)
1307  self._insertManyInto(adaptor, "@all_esprefers", self.es_prefers_(), True)
1308  self._insertManyInto(adaptor, "@all_aliases", self.aliases_(), True)
1309  # This will visit all the paths and endpaths that are scheduled to run,
1310  # as well as the Tasks associated to them and the schedule. It remembers
1311  # the modules, ESSources, ESProducers, and services it visits.
1312  nodeVisitor = NodeVisitor()
1313  self._insertPaths(adaptor, nodeVisitor)
1314  all_modules_onTasksOrScheduled = { key:value for key, value in six.iteritems(all_modules) if value in nodeVisitor.modules }
1315  self._insertManyInto(adaptor, "@all_modules", all_modules_onTasksOrScheduled, True)
1316  all_switches = self.switchProducers_().copy()
1317  all_switches_onTasksOrScheduled = {key:value for key, value in six.iteritems(all_switches) if value in nodeVisitor.modules }
1318  self._insertSwitchProducersInto(adaptor, "@all_modules", "@all_aliases", all_switches_onTasksOrScheduled, True)
1319  # Same as nodeVisitor except this one visits all the Tasks attached
1320  # to the process.
1321  processNodeVisitor = NodeVisitor()
1322  for pTask in six.itervalues(self.tasks):
1323  pTask.visit(processNodeVisitor)
1324  esProducersToEnable = {}
1325  for esProducerName, esProducer in six.iteritems(self.es_producers_()):
1326  if esProducer in nodeVisitor.esProducers or not (esProducer in processNodeVisitor.esProducers):
1327  esProducersToEnable[esProducerName] = esProducer
1328  self._insertManyInto(adaptor, "@all_esmodules", esProducersToEnable, True)
1329  esSourcesToEnable = {}
1330  for esSourceName, esSource in six.iteritems(self.es_sources_()):
1331  if esSource in nodeVisitor.esSources or not (esSource in processNodeVisitor.esSources):
1332  esSourcesToEnable[esSourceName] = esSource
1333  self._insertManyInto(adaptor, "@all_essources", esSourcesToEnable, True)
1334  #handle services differently
1335  services = []
1336  for serviceName, serviceObject in six.iteritems(self.services_()):
1337  if serviceObject in nodeVisitor.services or not (serviceObject in processNodeVisitor.services):
1338  serviceObject.insertInto(ServiceInjectorAdaptor(adaptor,services))
1339  adaptor.addVPSet(False,"services",services)
1340  return processPSet
1341 

References Config.Process.__init__(), and resolutioncreator_cfi.object.

◆ filterNames()

def Config.Process.filterNames (   self)
Returns a string containing all the EDFilter labels separated by a blank

Definition at line 158 of file Config.py.

158  def filterNames(self):
159  """Returns a string containing all the EDFilter labels separated by a blank"""
160  return ' '.join(self.filters_().keys())

References pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, Config.Process.filters_(), cms::DDFilteredView.filters_, FilterSelection.filters_, FilterSelections.filters_, join(), and relativeConstraints.keys.

◆ filters_()

def Config.Process.filters_ (   self)
returns a dict of the filters that have been added to the Process

Definition at line 182 of file Config.py.

182  def filters_(self):
183  """returns a dict of the filters that have been added to the Process"""
184  return DictTypes.FixedKeysDict(self.__filters)

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), Config.Process.filterNames(), Config.Process.prune(), and Config.Process.splitPython().

◆ globalReplace()

def Config.Process.globalReplace (   self,
  label,
  new 
)
Replace the item with label 'label' by object 'new' in the process and all sequences/paths/tasks

Definition at line 1081 of file Config.py.

1081  def globalReplace(self,label,new):
1082  """ Replace the item with label 'label' by object 'new' in the process and all sequences/paths/tasks"""
1083  if not hasattr(self,label):
1084  raise LookupError("process has no item of label "+label)
1085  setattr(self,label,new)

◆ isUsingModifier()

def Config.Process.isUsingModifier (   self,
  mod 
)
returns True if the Modifier is in used by this Process

Definition at line 341 of file Config.py.

341  def isUsingModifier(self,mod):
342  """returns True if the Modifier is in used by this Process"""
343  if mod._isChosen():
344  for m in self.__modifiers:
345  if m._isOrContains(mod):
346  return True
347  return False
348 

◆ load()

def Config.Process.load (   self,
  moduleName 
)

Definition at line 681 of file Config.py.

681  def load(self, moduleName):
682  moduleName = moduleName.replace("/",".")
683  module = __import__(moduleName)
684  self.extend(sys.modules[moduleName])

References svgfig.SVG.extend(), and Config.Process.extend().

◆ looper_()

def Config.Process.looper_ (   self)
returns the looper that has been added to the Process or None if none have been added

Definition at line 207 of file Config.py.

207  def looper_(self):
208  """returns the looper that has been added to the Process or None if none have been added"""
209  return self.__looper

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ name_()

def Config.Process.name_ (   self)

Definition at line 186 of file Config.py.

186  def name_(self):
187  return self.__name

References dataset.Dataset.__name, and genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name.

◆ outputModules_()

def Config.Process.outputModules_ (   self)
returns a dict of the output modules that have been added to the Process

Definition at line 273 of file Config.py.

273  def outputModules_(self):
274  """returns a dict of the output modules that have been added to the Process"""
275  return DictTypes.FixedKeysDict(self.__outputmodules)

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ pathNames()

def Config.Process.pathNames (   self)
Returns a string containing all the Path names separated by a blank

Definition at line 161 of file Config.py.

161  def pathNames(self):
162  """Returns a string containing all the Path names separated by a blank"""
163  return ' '.join(self.paths_().keys())
164 

References join(), relativeConstraints.keys, edm::MainParameterSet.paths_, edm::HLTGlobalStatus.paths_, heppy::TriggerBitChecker.paths_, edm::PathsAndConsumesOfModules.paths_, ProcessCallGraph::ProcessType.paths_, pat::TriggerEvent.paths_, HLTPerformanceInfo.paths_, Config.Process.paths_(), and FastTimerService::PlotsPerProcess.paths_.

◆ paths_()

def Config.Process.paths_ (   self)
returns a dict of the paths that have been added to the Process

Definition at line 277 of file Config.py.

277  def paths_(self):
278  """returns a dict of the paths that have been added to the Process"""
279  return DictTypes.SortedAndFixedKeysDict(self.__paths)

Referenced by Config.Process._insertPaths(), Config.Process.dumpConfig(), Config.Process.dumpPython(), Config.Process.pathNames(), and Config.Process.splitPython().

◆ prefer()

def Config.Process.prefer (   self,
  esmodule,
args,
**  kargs 
)
Prefer this ES source or producer.  The argument can
   either be an object label, e.g.,
     process.prefer(process.juicerProducer) (not supported yet)
   or a name of an ESSource or ESProducer
     process.prefer("juicer")
   or a type of unnamed ESSource or ESProducer
     process.prefer("JuicerProducer")
   In addition, you can pass as a labelled arguments the name of the Record you wish to
   prefer where the type passed is a cms.vstring and that vstring can contain the
   name of the C++ types in the Record that are being preferred, e.g.,
      #prefer all data in record 'OrangeRecord' from 'juicer'
      process.prefer("juicer", OrangeRecord=cms.vstring())
   or
      #prefer only "Orange" data in "OrangeRecord" from "juicer"
      process.prefer("juicer", OrangeRecord=cms.vstring("Orange"))
   or
      #prefer only "Orange" data with label "ExtraPulp" in "OrangeRecord" from "juicer"
      ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("Orange/ExtraPulp"))

Definition at line 1349 of file Config.py.

1349  def prefer(self, esmodule,*args,**kargs):
1350  """Prefer this ES source or producer. The argument can
1351  either be an object label, e.g.,
1352  process.prefer(process.juicerProducer) (not supported yet)
1353  or a name of an ESSource or ESProducer
1354  process.prefer("juicer")
1355  or a type of unnamed ESSource or ESProducer
1356  process.prefer("JuicerProducer")
1357  In addition, you can pass as a labelled arguments the name of the Record you wish to
1358  prefer where the type passed is a cms.vstring and that vstring can contain the
1359  name of the C++ types in the Record that are being preferred, e.g.,
1360  #prefer all data in record 'OrangeRecord' from 'juicer'
1361  process.prefer("juicer", OrangeRecord=cms.vstring())
1362  or
1363  #prefer only "Orange" data in "OrangeRecord" from "juicer"
1364  process.prefer("juicer", OrangeRecord=cms.vstring("Orange"))
1365  or
1366  #prefer only "Orange" data with label "ExtraPulp" in "OrangeRecord" from "juicer"
1367  ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("Orange/ExtraPulp"))
1368  """
1369  # see if this refers to a named ESProducer
1370  if isinstance(esmodule, ESSource) or isinstance(esmodule, ESProducer):
1371  raise RuntimeError("Syntax of process.prefer(process.esmodule) not supported yet")
1372  elif self._findPreferred(esmodule, self.es_producers_(),*args,**kargs) or \
1373  self._findPreferred(esmodule, self.es_sources_(),*args,**kargs):
1374  pass
1375  else:
1376  raise RuntimeError("Cannot resolve prefer for "+repr(esmodule))
1377 

◆ producerNames()

def Config.Process.producerNames (   self)
Returns a string containing all the EDProducer labels separated by a blank

Definition at line 149 of file Config.py.

149  def producerNames(self):
150  """Returns a string containing all the EDProducer labels separated by a blank"""
151  return ' '.join(self.producers_().keys())

References join(), relativeConstraints.keys, pf2pat::EventHypothesis.producers_, and Config.Process.producers_().

◆ producers_()

def Config.Process.producers_ (   self)
returns a dict of the producers that have been added to the Process

Definition at line 193 of file Config.py.

193  def producers_(self):
194  """returns a dict of the producers that have been added to the Process"""
195  return DictTypes.FixedKeysDict(self.__producers)

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), Config.Process.producerNames(), Config.Process.prune(), and Config.Process.splitPython().

◆ prune()

def Config.Process.prune (   self,
  verbose = False,
  keepUnresolvedSequencePlaceholders = False 
)
Remove clutter from the process that we think is unnecessary:
tracked PSets, VPSets and unused modules and sequences. If a Schedule has been set, then Paths and EndPaths
not in the schedule will also be removed, along with an modules and sequences used only by
those removed Paths and EndPaths. The keepUnresolvedSequencePlaceholders keeps also unresolved TaskPlaceholders.

Definition at line 1190 of file Config.py.

1190  def prune(self,verbose=False,keepUnresolvedSequencePlaceholders=False):
1191  """ Remove clutter from the process that we think is unnecessary:
1192  tracked PSets, VPSets and unused modules and sequences. If a Schedule has been set, then Paths and EndPaths
1193  not in the schedule will also be removed, along with an modules and sequences used only by
1194  those removed Paths and EndPaths. The keepUnresolvedSequencePlaceholders keeps also unresolved TaskPlaceholders."""
1195 # need to update this to only prune psets not on refToPSets
1196 # but for now, remove the delattr
1197 # for name in self.psets_():
1198 # if getattr(self,name).isTracked():
1199 # delattr(self, name)
1200  for name in self.vpsets_():
1201  delattr(self, name)
1202  #first we need to resolve any SequencePlaceholders being used
1203  self.resolve(keepUnresolvedSequencePlaceholders)
1204  usedModules = set()
1205  unneededPaths = set()
1206  tasks = list()
1207  tv = TaskVisitor(tasks)
1208  if self.schedule_():
1209  usedModules=set(self.schedule_().moduleNames())
1210  #get rid of unused paths
1211  schedNames = set(( x.label_() for x in self.schedule_()))
1212  names = set(self.paths)
1213  names.update(set(self.endpaths))
1214  unneededPaths = names - schedNames
1215  for n in unneededPaths:
1216  delattr(self,n)
1217  for t in self.schedule_().tasks():
1218  tv.enter(t)
1219  t.visit(tv)
1220  tv.leave(t)
1221  else:
1222  pths = list(six.itervalues(self.paths))
1223  pths.extend(six.itervalues(self.endpaths))
1224  temp = Schedule(*pths)
1225  usedModules=set(temp.moduleNames())
1226  unneededModules = self._pruneModules(self.producers_(), usedModules)
1227  unneededModules.update(self._pruneModules(self.switchProducers_(), usedModules))
1228  unneededModules.update(self._pruneModules(self.filters_(), usedModules))
1229  unneededModules.update(self._pruneModules(self.analyzers_(), usedModules))
1230  #remove sequences and tasks that do not appear in remaining paths and endpaths
1231  seqs = list()
1232  sv = SequenceVisitor(seqs)
1233  for p in six.itervalues(self.paths):
1234  p.visit(sv)
1235  p.visit(tv)
1236  for p in six.itervalues(self.endpaths):
1237  p.visit(sv)
1238  p.visit(tv)
1239  def removeUnneeded(seqOrTasks, allSequencesOrTasks):
1240  _keepSet = set(( s for s in seqOrTasks if s.hasLabel_()))
1241  _availableSet = set(six.itervalues(allSequencesOrTasks))
1242  _unneededSet = _availableSet-_keepSet
1243  _unneededLabels = []
1244  for s in _unneededSet:
1245  _unneededLabels.append(s.label_())
1246  delattr(self,s.label_())
1247  return _unneededLabels
1248  unneededSeqLabels = removeUnneeded(seqs, self.sequences)
1249  unneededTaskLabels = removeUnneeded(tasks, self.tasks)
1250  if verbose:
1251  print("prune removed the following:")
1252  print(" modules:"+",".join(unneededModules))
1253  print(" tasks:"+",".join(unneededTaskLabels))
1254  print(" sequences:"+",".join(unneededSeqLabels))
1255  print(" paths/endpaths:"+",".join(unneededPaths))

References Config.Process._pruneModules(), HLTMuonValidator.analyzers_, Config.Process.analyzers_(), Config.Process.endpaths, pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, Config.Process.filters_(), cms::DDFilteredView.filters_, FilterSelection.filters_, FilterSelections.filters_, join(), list(), cms::DDSpecPar.paths, Config.Process.paths, edm.print(), pf2pat::EventHypothesis.producers_, Config.Process.producers_(), Json::Path.resolve(), Config.Process.resolve(), EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.schedule_, edm::EventProcessor.schedule_, Config.Process.sequences, Config.Process.switchProducers_(), Config.Process.tasks, and Config.Process.vpsets_().

Referenced by dirstructure.Directory.prune().

◆ psets_()

def Config.Process.psets_ (   self)
returns a dict of the PSets that have been added to the Process

Definition at line 332 of file Config.py.

332  def psets_(self):
333  """returns a dict of the PSets that have been added to the Process"""
334  return DictTypes.FixedKeysDict(self.__psets)

◆ resolve()

def Config.Process.resolve (   self,
  keepUnresolvedSequencePlaceholders = False 
)

Definition at line 1181 of file Config.py.

1181  def resolve(self,keepUnresolvedSequencePlaceholders=False):
1182  for x in six.itervalues(self.paths):
1183  x.resolve(self.__dict__,keepUnresolvedSequencePlaceholders)
1184  for x in six.itervalues(self.endpaths):
1185  x.resolve(self.__dict__,keepUnresolvedSequencePlaceholders)
1186  if not self.schedule_() == None:
1187  for task in self.schedule_()._tasks:
1188  task.resolve(self.__dict__,keepUnresolvedSequencePlaceholders)
1189 

References Config.Process.endpaths, cms::DDSpecPar.paths, Config.Process.paths, EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.schedule_, and edm::EventProcessor.schedule_.

Referenced by Config.Process.prune().

◆ schedule_()

def Config.Process.schedule_ (   self)
returns the schedule that has been added to the Process or None if none have been added

Definition at line 293 of file Config.py.

293  def schedule_(self):
294  """returns the schedule that has been added to the Process or None if none have been added"""
295  return self.__schedule

Referenced by Config.Process._insertPaths(), Config.Process._replaceInSchedule(), Config.Process.dumpPython(), Config.Process.prune(), Config.Process.resolve(), and Config.Process.splitPython().

◆ sequences_()

def Config.Process.sequences_ (   self)
returns a dict of the sequences that have been added to the Process

Definition at line 285 of file Config.py.

285  def sequences_(self):
286  """returns a dict of the sequences that have been added to the Process"""
287  return DictTypes.FixedKeysDict(self.__sequences)

Referenced by Config.Process.dumpConfig().

◆ services_()

def Config.Process.services_ (   self)
returns a dict of the services that have been added to the Process

Definition at line 312 of file Config.py.

312  def services_(self):
313  """returns a dict of the services that have been added to the Process"""
314  return DictTypes.FixedKeysDict(self.__services)

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ setLooper_()

def Config.Process.setLooper_ (   self,
  lpr 
)

Definition at line 210 of file Config.py.

210  def setLooper_(self,lpr):
211  self._placeLooper('looper',lpr)

References Config.Process._placeLooper().

◆ setName_()

def Config.Process.setName_ (   self,
  name 
)

Definition at line 188 of file Config.py.

188  def setName_(self,name):
189  if not name.isalnum():
190  raise RuntimeError("Error: The process name is an empty string or contains non-alphanumeric characters")
191  self.__dict__['_Process__name'] = name

◆ setPartialSchedule_()

def Config.Process.setPartialSchedule_ (   self,
  sch,
  label 
)

Definition at line 296 of file Config.py.

296  def setPartialSchedule_(self,sch,label):
297  if label == "schedule":
298  self.setSchedule_(sch)
299  else:
300  self._place(label, sch, self.__partialschedules)

References Config.Process._place(), and Config.Process.setSchedule_().

◆ setSchedule_()

def Config.Process.setSchedule_ (   self,
  sch 
)

Definition at line 301 of file Config.py.

301  def setSchedule_(self,sch):
302  # See if every path and endpath has been inserted into the process
303  index = 0
304  try:
305  for p in sch:
306  p.label_()
307  index +=1
308  except:
309  raise RuntimeError("The path at index "+str(index)+" in the Schedule was not attached to the process.")
310  self.__dict__['_Process__schedule'] = sch

References str.

Referenced by Config.Process.setPartialSchedule_().

◆ setSource_()

def Config.Process.setSource_ (   self,
  src 
)

Definition at line 204 of file Config.py.

204  def setSource_(self,src):
205  self._placeSource('source',src)

References Config.Process._placeSource().

◆ setStrict()

def Config.Process.setStrict (   self,
  value 
)

Definition at line 144 of file Config.py.

144  def setStrict(self, value):
145  self.__isStrict = value
146  _Module.__isStrict__ = True
147 

References Config.Process.__isStrict.

◆ source_()

def Config.Process.source_ (   self)
returns the source that has been added to the Process or None if none have been added

Definition at line 201 of file Config.py.

201  def source_(self):
202  """returns the source that has been added to the Process or None if none have been added"""
203  return self.__source

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ splitPython()

def Config.Process.splitPython (   self,
  options = PrintOptions() 
)
return a map of file names to python configuration fragments

Definition at line 989 of file Config.py.

989  def splitPython(self, options = PrintOptions()):
990  """return a map of file names to python configuration fragments"""
991  specialImportRegistry._reset()
992  # extract individual fragments
993  options.isCfg = False
994  header = "import FWCore.ParameterSet.Config as cms"
995  result = ''
996  parts = {}
997  files = {}
998 
999  result = 'process = cms.Process("' + self.__name + '")\n\n'
1000 
1001  if self.source_():
1002  parts['source'] = (None, 'source = ' + self.source_().dumpPython(options))
1003 
1004  if self.looper_():
1005  parts['looper'] = (None, 'looper = ' + self.looper_().dumpPython())
1006 
1007  parts.update(self._splitPythonList('psets', self.psets, options))
1008  parts.update(self._splitPythonList('psets', self.vpsets, options))
1009  # FIXME
1010  #parts.update(self._splitPythonSubProcesses(self.subProcesses_(), options))
1011  if len(self.subProcesses_()):
1012  sys.stderr.write("error: subprocesses are not supported yet\n\n")
1013  parts.update(self._splitPythonList('modules', self.producers_(), options))
1014  parts.update(self._splitPythonList('modules', self.switchProducers_(), options))
1015  parts.update(self._splitPythonList('modules', self.filters_() , options))
1016  parts.update(self._splitPythonList('modules', self.analyzers_(), options))
1017  parts.update(self._splitPythonList('modules', self.outputModules_(), options))
1018  parts.update(self._splitPythonList('services', self.services_(), options))
1019  parts.update(self._splitPythonList('eventsetup', self.es_producers_(), options))
1020  parts.update(self._splitPythonList('eventsetup', self.es_sources_(), options))
1021  parts.update(self._splitPython('eventsetup', self.es_prefers_(), options))
1022  parts.update(self._splitPythonList('tasks', self._itemsInDependencyOrder(self.tasks), options))
1023  parts.update(self._splitPythonList('sequences', self._itemsInDependencyOrder(self.sequences), options))
1024  parts.update(self._splitPythonList('paths', self.paths_(), options))
1025  parts.update(self._splitPythonList('paths', self.endpaths_(), options))
1026  parts.update(self._splitPythonList('modules', self.aliases_(), options))
1027 
1028  if options.targetDirectory is not None:
1029  files[options.targetDirectory + '/__init__.py'] = ''
1030 
1031  if options.useSubdirectories:
1032  for sub in 'psets', 'modules', 'services', 'eventsetup', 'tasks', 'sequences', 'paths':
1033  if options.targetDirectory is not None:
1034  sub = options.targetDirectory + '/' + sub
1035  files[sub + '/__init__.py'] = ''
1036 
1037  for (name, (subfolder, code)) in six.iteritems(parts):
1038  filename = name + '_cfi'
1039  if options.useSubdirectories and subfolder:
1040  filename = subfolder + '/' + filename
1041  if options.targetDirectory is not None:
1042  filename = options.targetDirectory + '/' + filename
1043  result += 'process.load("%s")\n' % filename
1044  files[filename + '.py'] = header + '\n\n' + code
1045 
1046  if self.schedule_() is not None:
1047  options.isCfg = True
1048  result += 'process.schedule = ' + self.schedule.dumpPython(options)
1049 
1050  imports = specialImportRegistry.getSpecialImports()
1051  if len(imports) > 0:
1052  header += '\n' + '\n'.join(imports)
1053  files['-'] = header + '\n\n' + result
1054  return files
1055 

References dataset.Dataset.__name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.__name, Config.Process._itemsInDependencyOrder(), Config.Process._splitPython(), Config.Process._splitPythonList(), Config.Process.aliases_(), HLTMuonValidator.analyzers_, Config.Process.analyzers_(), Config.Process.dumpPython(), Config.Process.endpaths_(), FastTimerService::PlotsPerProcess.endpaths_, Config.Process.es_prefers_(), Config.Process.es_producers_(), Config.Process.es_sources_(), pat::eventhypothesis::AndFilter.filters_, pat::eventhypothesis::OrFilter.filters_, pat::TriggerEvent.filters_, TrigObjTnPHistColl::FilterSelector::FilterSet.filters_, FilterOR.filters_, Config.Process.filters_(), cms::DDFilteredView.filters_, FilterSelection.filters_, FilterSelections.filters_, join(), Config.Process.looper_(), edm::EventProcessor.looper_, Config.Process.outputModules_(), edm::MainParameterSet.paths_, edm::HLTGlobalStatus.paths_, heppy::TriggerBitChecker.paths_, edm::PathsAndConsumesOfModules.paths_, ProcessCallGraph::ProcessType.paths_, pat::TriggerEvent.paths_, HLTPerformanceInfo.paths_, Config.Process.paths_(), FastTimerService::PlotsPerProcess.paths_, pf2pat::EventHypothesis.producers_, Config.Process.producers_(), Config.Process.psets, ConfigBuilder.ConfigBuilder.schedule, Config.Process.schedule, EcalDQMonitorTask.schedule_, edm::ModuleChanger.schedule_, edm::ScheduleInfo.schedule_, edm::PathsAndConsumesOfModules.schedule_, Config.Process.schedule_(), edm::SubProcess.schedule_, edm::test::TestProcessor.schedule_, edm::EventProcessor.schedule_, Config.Process.sequences, edm::ProcessDesc.services_, Config.Process.services_(), ecaldqm::DBWriterWorker.source_, SiStripFedCablingBuilderFromDb.source_, jsoncollector::DataPoint.source_, sistrip::SpyEventMatcher.source_, ProcessCallGraph.source_, Config.Process.source_(), edm::InputSource::EventSourceSentry.source_, edm::InputSource::LumiSourceSentry.source_, edm::InputSource::RunSourceSentry.source_, Config.Process.subProcesses_(), edm::SubProcess.subProcesses_, edm::EventProcessor.subProcesses_, Config.Process.switchProducers_(), Config.Process.tasks, and Config.Process.vpsets.

◆ subProcesses_()

def Config.Process.subProcesses_ (   self)
returns a list of the subProcesses that have been added to the Process

Definition at line 265 of file Config.py.

265  def subProcesses_(self):
266  """returns a list of the subProcesses that have been added to the Process"""
267  return self.__subProcesses

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), and Config.Process.splitPython().

◆ switchProducerNames()

def Config.Process.switchProducerNames (   self)
Returns a string containing all the SwitchProducer labels separated by a blank

Definition at line 152 of file Config.py.

152  def switchProducerNames(self):
153  """Returns a string containing all the SwitchProducer labels separated by a blank"""
154  return ' '.join(self.switchProducers_().keys())

References join(), relativeConstraints.keys, and Config.Process.switchProducers_().

◆ switchProducers_()

def Config.Process.switchProducers_ (   self)
returns a dict of the SwitchProducers that have been added to the Process

Definition at line 197 of file Config.py.

197  def switchProducers_(self):
198  """returns a dict of the SwitchProducers that have been added to the Process"""
199  return DictTypes.FixedKeysDict(self.__switchproducers)

Referenced by Config.Process.dumpConfig(), Config.Process.dumpPython(), Config.Process.prune(), Config.Process.splitPython(), and Config.Process.switchProducerNames().

◆ tasks_()

def Config.Process.tasks_ (   self)
returns a dict of the tasks that have been added to the Process

Definition at line 289 of file Config.py.

289  def tasks_(self):
290  """returns a dict of the tasks that have been added to the Process"""
291  return DictTypes.FixedKeysDict(self.__tasks)

◆ validate()

def Config.Process.validate (   self)

Definition at line 1342 of file Config.py.

1342  def validate(self):
1343  # check if there's some input
1344  # Breaks too many unit tests for now
1345  #if self.source_() == None and self.looper_() == None:
1346  # raise RuntimeError("No input source was found for this process")
1347  pass
1348 

◆ vpsets_()

def Config.Process.vpsets_ (   self)
returns a dict of the VPSets that have been added to the Process

Definition at line 336 of file Config.py.

336  def vpsets_(self):
337  """returns a dict of the VPSets that have been added to the Process"""
338  return DictTypes.FixedKeysDict(self.__vpsets)

Referenced by Config.Process.prune().

Member Data Documentation

◆ __isStrict

Config.Process.__isStrict
private

◆ __ppset

Config.Process.__ppset
private

Definition at line 1278 of file Config.py.

◆ __process

Config.Process.__process
private

◆ __processPSet

Config.Process.__processPSet
private

Definition at line 1268 of file Config.py.

◆ __thelist

Config.Process.__thelist
private

Definition at line 1267 of file Config.py.

◆ maxEvents

Config.Process.maxEvents

Definition at line 139 of file Config.py.

◆ maxLuminosityBlocks

Config.Process.maxLuminosityBlocks

Definition at line 140 of file Config.py.

◆ options

Config.Process.options

Property Documentation

◆ aliases

Config.Process.aliases = property(aliases_,doc="dictionary containing the aliases for the process")
static

Definition at line 331 of file Config.py.

◆ analyzers

Config.Process.analyzers = property(analyzers_,doc="dictionary containing the analyzers for the process")
static

Definition at line 272 of file Config.py.

Referenced by looper.Looper.loop(), and looper.Looper.write().

◆ endpaths

Config.Process.endpaths = property(endpaths_,doc="dictionary containing the endpaths for the process")
static

◆ es_prefers

Config.Process.es_prefers = property(es_prefers_,doc="dictionary containing the es_prefers for the process")
static

Definition at line 327 of file Config.py.

◆ es_producers

Config.Process.es_producers = property(es_producers_,doc="dictionary containing the es_producers for the process")
static

Definition at line 319 of file Config.py.

◆ es_sources

Config.Process.es_sources = property(es_sources_,doc="dictionary containing the es_sources for the process")
static

Definition at line 323 of file Config.py.

◆ filters

Config.Process.filters = property(filters_, doc="dictionary containing the filters for the process")
static

Definition at line 185 of file Config.py.

◆ looper

Config.Process.looper = property(looper_,setLooper_,doc='the main looper or None if not set')
static

Definition at line 212 of file Config.py.

◆ outputModules

Config.Process.outputModules = property(outputModules_,doc="dictionary containing the output_modules for the process")
static

Definition at line 276 of file Config.py.

◆ paths

Config.Process.paths = property(paths_,doc="dictionary containing the paths for the process")
static

◆ process

Config.Process.process = property(name_,setName_, doc="name of the process")
static

◆ producers

Config.Process.producers = property(producers_,doc="dictionary containing the producers for the process")
static

Definition at line 196 of file Config.py.

◆ psets

Config.Process.psets = property(psets_,doc="dictionary containing the PSets for the process")
static

◆ schedule

Config.Process.schedule = property(schedule_,setSchedule_,doc='the schedule or None if not set')
static

◆ sequences

Config.Process.sequences = property(sequences_,doc="dictionary containing the sequences for the process")
static

◆ services

Config.Process.services = property(services_,doc="dictionary containing the services for the process")
static

◆ source

Config.Process.source = property(source_,setSource_,doc='the main source or None if not set')
static

◆ subProcesses

Config.Process.subProcesses = property(subProcesses_,doc='the SubProcesses that have been added to the Process')
static

Definition at line 268 of file Config.py.

◆ switchProducers

Config.Process.switchProducers = property(switchProducers_,doc="dictionary containing the SwitchProducers for the process")
static

Definition at line 200 of file Config.py.

◆ tasks

Config.Process.tasks = property(tasks_,doc="dictionary containing the tasks for the process")
static

◆ vpsets

Config.Process.vpsets = property(vpsets_,doc="dictionary containing the PSets for the process")
static
resolutioncreator_cfi.object
object
Definition: resolutioncreator_cfi.py:4
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
ExceptionHandling.format_outerframe
def format_outerframe(number)
Definition: ExceptionHandling.py:13
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
FastTimer.addService
def addService(process, multirun=False)
Definition: FastTimer.py:3
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
DictTypes.SortedAndFixedKeysDict
Definition: DictTypes.py:54
str
#define str(s)
Definition: TestProcessor.cc:48
svgfig.load
def load(fileName)
Definition: svgfig.py:547
DictTypes.SortedKeysDict
Definition: DictTypes.py:3
Exception
mps_setup.append
append
Definition: mps_setup.py:85
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
DictTypes.FixedKeysDict
Definition: DictTypes.py:72
patCandidatesForDimuonsSequences_cff.pathNames
pathNames
Definition: patCandidatesForDimuonsSequences_cff.py:109
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
Herwig7_Dummy_Matchbox_90X_ppToee.dumpConfig
dumpConfig
Definition: Herwig7_Dummy_Matchbox_90X_ppToee.py:8
ConfigBuilder.dumpPython
def dumpPython(process, name)
Definition: ConfigBuilder.py:92
list
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*", "!HLTx*" if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL. It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of "!*" before the partial wildcard feature was incorporated). Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
SequenceTypes
update
#define update(a, b)
Definition: TrackClassifier.cc:10
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23