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 101 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 103 of file Config.py.

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

Referenced by Config.Process.fillProcessDesc().

Member Function Documentation

◆ __delattr__()

def Config.Process.__delattr__ (   self,
  name 
)

Definition at line 539 of file Config.py.

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

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 509 of file Config.py.

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

Referenced by Config.Process.__setattr__().

◆ __setattr__()

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

Definition at line 377 of file Config.py.

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

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

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 164 of file Config.py.

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

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

◆ __updateMaxEvents()

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

Definition at line 254 of file Config.py.

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

References Config.Process.defaultMaxEvents_().

Referenced by Config.Process.__setattr__().

◆ __updateOptions()

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

Definition at line 241 of file Config.py.

241  def __updateOptions(self,opt):
242  newOpts = self.defaultOptions_()
243  if isinstance(opt,dict):
244  for k,v in opt.items():
245  setattr(newOpts,k,v)
246  else:
247  for p in opt.parameters_():
248  setattr(newOpts, p, getattr(opt,p))
249  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 564 of file Config.py.

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

References Config.Process._delHelper().

Referenced by Config.Process.__setattr__().

◆ _delHelper()

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

Definition at line 522 of file Config.py.

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

References contentValuesCheck.values.

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

◆ _dumpConfigESPrefers()

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

Definition at line 826 of file Config.py.

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

References Config.Process.es_prefers_(), and contentValuesCheck.values.

Referenced by Config.Process.dumpConfig().

◆ _dumpConfigNamedList()

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

Definition at line 740 of file Config.py.

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

Referenced by Config.Process.dumpConfig().

◆ _dumpConfigOptionallyNamedList()

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

Definition at line 752 of file Config.py.

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

Referenced by Config.Process.dumpConfig().

◆ _dumpConfigUnnamedList()

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

Definition at line 746 of file Config.py.

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

Referenced by Config.Process.dumpConfig().

◆ _dumpPython()

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

Definition at line 944 of file Config.py.

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

Referenced by Config.Process.dumpPython().

◆ _dumpPythonList()

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

Definition at line 838 of file Config.py.

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

Referenced by Config.Process.dumpPython().

◆ _dumpPythonSubProcesses()

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

Definition at line 832 of file Config.py.

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

Referenced by Config.Process.dumpPython().

◆ _findPreferred()

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

Definition at line 1382 of file Config.py.

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

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

◆ _insertInto()

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

Definition at line 1090 of file Config.py.

1090  def _insertInto(self, parameterSet, itemDict):
1091  for name,value in itemDict.items():
1092  value.insertInto(parameterSet, name)

◆ _insertManyInto()

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

Definition at line 1100 of file Config.py.

1100  def _insertManyInto(self, parameterSet, label, itemDict, tracked):
1101  l = []
1102  for name,value in itemDict.items():
1103  value.appendToProcessDescList_(l, name)
1104  value.insertInto(parameterSet, name)
1105  # alphabetical order is easier to compare with old language
1106  l.sort()
1107  parameterSet.addVString(tracked, label, l)

◆ _insertOneInto()

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

Definition at line 1093 of file Config.py.

1093  def _insertOneInto(self, parameterSet, label, item, tracked):
1094  vitems = []
1095  if not item == None:
1096  newlabel = item.nameInProcessDesc_(label)
1097  vitems = [newlabel]
1098  item.insertInto(parameterSet, newlabel)
1099  parameterSet.addVString(tracked, label, vitems)

◆ _insertPaths()

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

Definition at line 1131 of file Config.py.

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

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::EventProcessor.schedule_, and edm::test::TestProcessor.schedule_.

◆ _insertSubProcessesInto()

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

Definition at line 1118 of file Config.py.

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

◆ _insertSwitchProducersInto()

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

Definition at line 1108 of file Config.py.

1108  def _insertSwitchProducersInto(self, parameterSet, labelModules, labelAliases, itemDict, tracked):
1109  modules = parameterSet.getVString(tracked, labelModules)
1110  aliases = parameterSet.getVString(tracked, labelAliases)
1111  for name,value in itemDict.items():
1112  value.appendToProcessDescLists_(modules, aliases, name)
1113  value.insertInto(parameterSet, name)
1114  modules.sort()
1115  aliases.sort()
1116  parameterSet.addVString(tracked, labelModules, modules)
1117  parameterSet.addVString(tracked, labelAliases, aliases)

◆ _itemsInDependencyOrder()

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

Definition at line 887 of file Config.py.

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

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

◆ _okToPlace()

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

Definition at line 588 of file Config.py.

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

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 609 of file Config.py.

609  def _place(self, name, mod, d):
610  if self._okToPlace(name, mod, d):
611  if self.__isStrict and isinstance(mod, _ModuleSequenceType):
612  d[name] = mod._postProcessFixup(self._cloneToObjectDict)
613  else:
614  d[name] = mod
615  if isinstance(mod,_Labelable):
616  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 653 of file Config.py.

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

References Config.Process._place().

◆ _placeAnalyzer()

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

Definition at line 625 of file Config.py.

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

References Config.Process._place().

◆ _placeEndPath()

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

Definition at line 634 of file Config.py.

634  def _placeEndPath(self,name,mod):
635  self._validateSequence(mod, name)
636  try:
637  self._place(name, mod, self.__endpaths)
638  except ModuleCloneError as msg:
639  context = format_outerframe(4)
640  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 646 of file Config.py.

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

References Config.Process._place().

◆ _placeESProducer()

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

Definition at line 644 of file Config.py.

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

References Config.Process._place().

◆ _placeESSource()

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

Definition at line 648 of file Config.py.

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

References Config.Process._place().

◆ _placeFilter()

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

Definition at line 623 of file Config.py.

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

References Config.Process._place().

◆ _placeLooper()

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

Definition at line 667 of file Config.py.

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

Referenced by Config.Process.setLooper_().

◆ _placeOutputModule()

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

Definition at line 617 of file Config.py.

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

References Config.Process._place().

◆ _placePath()

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

Definition at line 627 of file Config.py.

627  def _placePath(self,name,mod):
628  self._validateSequence(mod, name)
629  try:
630  self._place(name, mod, self.__paths)
631  except ModuleCloneError as msg:
632  context = format_outerframe(4)
633  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 619 of file Config.py.

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

References Config.Process._place().

◆ _placePSet()

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

Definition at line 655 of file Config.py.

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

References Config.Process._place().

◆ _placeSequence()

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

Definition at line 641 of file Config.py.

641  def _placeSequence(self,name,mod):
642  self._validateSequence(mod, name)
643  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 677 of file Config.py.

677  def _placeService(self,typeName,mod):
678  self._place(typeName, mod, self.__services)
679  if typeName in self.__dict__:
680  self.__dict__[typeName]._inProcess = False
681  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 659 of file Config.py.

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

Referenced by Config.Process.setSource_().

◆ _placeSubProcess()

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

Definition at line 672 of file Config.py.

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

◆ _placeSwitchProducer()

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

Definition at line 621 of file Config.py.

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

References Config.Process._place().

◆ _placeTask()

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

Definition at line 650 of file Config.py.

650  def _placeTask(self,name,task):
651  self._validateTask(task, name)
652  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 657 of file Config.py.

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

References Config.Process._place().

◆ _pruneModules()

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

Definition at line 1260 of file Config.py.

1260  def _pruneModules(self, d, scheduledNames):
1261  moduleNames = set(d.keys())
1262  junk = moduleNames - scheduledNames
1263  for name in junk:
1264  delattr(self, name)
1265  return junk
1266 

Referenced by Config.Process.prune().

◆ _replaceInSchedule()

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

Definition at line 1079 of file Config.py.

1079  def _replaceInSchedule(self, label, new):
1080  if self.schedule_() == None:
1081  return
1082  old = getattr(self,label)
1083  for task in self.schedule_()._tasks:
1084  task.replace(old, new)

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

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

◆ _replaceInSequences()

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

Definition at line 1060 of file Config.py.

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

References Config.Process.endpaths, Config.Process.paths, Config.Process.sequences, and contentValuesCheck.values.

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

◆ _replaceInTasks()

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

Definition at line 1075 of file Config.py.

1075  def _replaceInTasks(self, label, new):
1076  old = getattr(self,label)
1077  for task in self.tasks.values():
1078  task.replace(old, new)

References Config.Process.tasks, and contentValuesCheck.values.

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

◆ _splitPython()

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

Definition at line 950 of file Config.py.

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

Referenced by Config.Process.splitPython().

◆ _splitPythonList()

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

Definition at line 848 of file Config.py.

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

Referenced by Config.Process.splitPython().

◆ _validateSequence()

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

Definition at line 869 of file Config.py.

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

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

◆ _validateTask()

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

Definition at line 878 of file Config.py.

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

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 573 of file Config.py.

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

References Config.Process.__isStrict.

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

◆ addSubProcess()

def Config.Process.addSubProcess (   self,
  mod 
)

Definition at line 675 of file Config.py.

675  def addSubProcess(self,mod):
676  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 329 of file Config.py.

329  def aliases_(self):
330  """returns a dict of the aliases that have been added to the Process"""
331  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 154 of file Config.py.

154  def analyzerNames(self):
155  """Returns a string containing all the EDAnalyzer labels separated by a blank"""
156  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 270 of file Config.py.

270  def analyzers_(self):
271  """returns a dict of the analyzers that have been added to the Process"""
272  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 251 of file Config.py.

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

Referenced by Config.Process.__updateMaxEvents().

◆ defaultMaxLuminosityBlocks_()

def Config.Process.defaultMaxLuminosityBlocks_ ( )
static

Definition at line 264 of file Config.py.

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

◆ defaultOptions_()

def Config.Process.defaultOptions_ ( )
static

Definition at line 213 of file Config.py.

213  def defaultOptions_():
214  return untracked.PSet(numberOfThreads = untracked.uint32(1),
215  numberOfStreams = untracked.uint32(0),
216  numberOfConcurrentRuns = untracked.uint32(1),
217  numberOfConcurrentLuminosityBlocks = untracked.uint32(0),
218  eventSetup = untracked.PSet(
219  numberOfConcurrentIOVs = untracked.uint32(0),
220  forceNumberOfConcurrentIOVs = untracked.PSet(
221  allowAnyLabel_ = required.untracked.uint32
222  )
223  ),
224  wantSummary = untracked.bool(False),
225  fileMode = untracked.string('FULLMERGE'),
226  forceEventSetupCacheClearOnNewRun = untracked.bool(False),
227  throwIfIllegalParameter = untracked.bool(True),
228  printDependencies = untracked.bool(False),
229  deleteNonConsumedUnscheduledModules = untracked.bool(True),
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  dumpOptions = untracked.bool(False),
237  allowUnscheduled = obsolete.untracked.bool,
238  emptyRunLumiMode = obsolete.untracked.string,
239  makeTriggerResults = obsolete.untracked.bool
240  )

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 760 of file Config.py.

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

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_, mps_monitormerge.items, 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_, L2MuonSeedGeneratorFromL1TkMu.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_, edm::InputSource::ProcessBlockSourceSentry.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 956 of file Config.py.

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

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::EventProcessor.schedule_, edm::test::TestProcessor.schedule_, Config.Process.sequences, edm::ProcessDesc.services_, Config.Process.services_(), ecaldqm::DBWriterWorker.source_, L2MuonSeedGeneratorFromL1TkMu.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_, edm::InputSource::ProcessBlockSourceSentry.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 282 of file Config.py.

282  def endpaths_(self):
283  """returns a dict of the endpaths that have been added to the Process"""
284  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 325 of file Config.py.

325  def es_prefers_(self):
326  """returns a dict of the es_prefers that have been added to the Process"""
327  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 317 of file Config.py.

317  def es_producers_(self):
318  """returns a dict of the esproducers that have been added to the Process"""
319  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 321 of file Config.py.

321  def es_sources_(self):
322  """returns a the es_sources that have been added to the Process"""
323  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 686 of file Config.py.

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

References psClasses.BuildTreeNode.__setattr__(), Config.Process.__setattr__(), Config.FilteredStream.__setattr__, Config.Process.__setObjectLabel(), Config.Process.add_(), DeadROC_duringRun.dir, SiStripCluster.extend(), 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 1267 of file Config.py.

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

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 157 of file Config.py.

157  def filterNames(self):
158  """Returns a string containing all the EDFilter labels separated by a blank"""
159  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 181 of file Config.py.

181  def filters_(self):
182  """returns a dict of the filters that have been added to the Process"""
183  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 1085 of file Config.py.

1085  def globalReplace(self,label,new):
1086  """ Replace the item with label 'label' by object 'new' in the process and all sequences/paths/tasks"""
1087  if not hasattr(self,label):
1088  raise LookupError("process has no item of label "+label)
1089  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 342 of file Config.py.

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

◆ load()

def Config.Process.load (   self,
  moduleName 
)

Definition at line 682 of file Config.py.

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

References SiStripCluster.extend(), 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 206 of file Config.py.

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

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

◆ name_()

def Config.Process.name_ (   self)

Definition at line 185 of file Config.py.

185  def name_(self):
186  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 274 of file Config.py.

274  def outputModules_(self):
275  """returns a dict of the output modules that have been added to the Process"""
276  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 160 of file Config.py.

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

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 278 of file Config.py.

278  def paths_(self):
279  """returns a dict of the paths that have been added to the Process"""
280  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 1353 of file Config.py.

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

◆ producerNames()

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

Definition at line 148 of file Config.py.

148  def producerNames(self):
149  """Returns a string containing all the EDProducer labels separated by a blank"""
150  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 192 of file Config.py.

192  def producers_(self):
193  """returns a dict of the producers that have been added to the Process"""
194  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 1194 of file Config.py.

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

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

◆ resolve()

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

Definition at line 1185 of file Config.py.

1185  def resolve(self,keepUnresolvedSequencePlaceholders=False):
1186  for x in self.paths.values():
1187  x.resolve(self.__dict__,keepUnresolvedSequencePlaceholders)
1188  for x in self.endpaths.values():
1189  x.resolve(self.__dict__,keepUnresolvedSequencePlaceholders)
1190  if not self.schedule_() == None:
1191  for task in self.schedule_()._tasks:
1192  task.resolve(self.__dict__,keepUnresolvedSequencePlaceholders)
1193 

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

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 294 of file Config.py.

294  def schedule_(self):
295  """returns the schedule that has been added to the Process or None if none have been added"""
296  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 286 of file Config.py.

286  def sequences_(self):
287  """returns a dict of the sequences that have been added to the Process"""
288  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 313 of file Config.py.

313  def services_(self):
314  """returns a dict of the services that have been added to the Process"""
315  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 209 of file Config.py.

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

References Config.Process._placeLooper().

◆ setName_()

def Config.Process.setName_ (   self,
  name 
)

Definition at line 187 of file Config.py.

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

◆ setPartialSchedule_()

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

Definition at line 297 of file Config.py.

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

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

◆ setSchedule_()

def Config.Process.setSchedule_ (   self,
  sch 
)

Definition at line 302 of file Config.py.

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

References str.

Referenced by Config.Process.setPartialSchedule_().

◆ setSource_()

def Config.Process.setSource_ (   self,
  src 
)

Definition at line 203 of file Config.py.

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

References Config.Process._placeSource().

◆ setStrict()

def Config.Process.setStrict (   self,
  value 
)

Definition at line 143 of file Config.py.

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

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 200 of file Config.py.

200  def source_(self):
201  """returns the source that has been added to the Process or None if none have been added"""
202  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 990 of file Config.py.

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

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::EventProcessor.schedule_, edm::test::TestProcessor.schedule_, Config.Process.sequences, edm::ProcessDesc.services_, Config.Process.services_(), ecaldqm::DBWriterWorker.source_, L2MuonSeedGeneratorFromL1TkMu.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_, edm::InputSource::ProcessBlockSourceSentry.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 266 of file Config.py.

266  def subProcesses_(self):
267  """returns a list of the subProcesses that have been added to the Process"""
268  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 151 of file Config.py.

151  def switchProducerNames(self):
152  """Returns a string containing all the SwitchProducer labels separated by a blank"""
153  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 196 of file Config.py.

196  def switchProducers_(self):
197  """returns a dict of the SwitchProducers that have been added to the Process"""
198  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 290 of file Config.py.

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

◆ validate()

def Config.Process.validate (   self)

Definition at line 1346 of file Config.py.

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

◆ vpsets_()

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

Definition at line 337 of file Config.py.

337  def vpsets_(self):
338  """returns a dict of the VPSets that have been added to the Process"""
339  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 1282 of file Config.py.

◆ __process

Config.Process.__process
private

◆ __processPSet

Config.Process.__processPSet
private

Definition at line 1272 of file Config.py.

◆ __thelist

Config.Process.__thelist
private

Definition at line 1271 of file Config.py.

◆ maxEvents

Config.Process.maxEvents

Definition at line 138 of file Config.py.

◆ maxLuminosityBlocks

Config.Process.maxLuminosityBlocks

Definition at line 139 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 332 of file Config.py.

◆ analyzers

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

Definition at line 273 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 328 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 320 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 324 of file Config.py.

◆ filters

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

Definition at line 184 of file Config.py.

◆ looper

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

Definition at line 211 of file Config.py.

◆ outputModules

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

Definition at line 277 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 195 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 269 of file Config.py.

◆ switchProducers

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

Definition at line 199 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
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
DictTypes.SortedAndFixedKeysDict
Definition: DictTypes.py:53
str
#define str(s)
Definition: TestProcessor.cc:53
svgfig.load
def load(fileName)
Definition: svgfig.py:547
DictTypes.SortedKeysDict
Definition: DictTypes.py:2
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
Exception
mps_setup.append
append
Definition: mps_setup.py:85
DictTypes.FixedKeysDict
Definition: DictTypes.py:71
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
Herwig7_Dummy_Matchbox_90X_ppToee.dumpConfig
dumpConfig
Definition: Herwig7_Dummy_Matchbox_90X_ppToee.py:8
ConfigBuilder.dumpPython
def dumpPython(process, name)
Definition: ConfigBuilder.py:94
SequenceTypes
update
#define update(a, b)
Definition: TrackClassifier.cc:10
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23