CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
SequenceTypes.Schedule Class Reference
Inheritance diagram for SequenceTypes.Schedule:
Mixins._ValidatingParameterListBase Mixins._ConfigureComponent Mixins._Unlabelable Mixins._ValidatingListBase Mixins._ParameterTypeBase

Public Member Functions

def __init__ (self, arg, argv)
 
def __str__ (self)
 
def associate (self, tasks)
 
def contains (self, mod)
 
def copy (self)
 
def dumpPython (self, options=PrintOptions())
 
def moduleNames (self)
 
- Public Member Functions inherited from Mixins._ValidatingParameterListBase
def __init__ (self, arg, args)
 
def __repr__ (self)
 
def configValue (self, options=PrintOptions())
 
def configValueForItem (self, item, options)
 
def dumpPython (self, options=PrintOptions())
 
def pythonValueForItem (self, item, options)
 
def setValue (self, v)
 
def value (self)
 
- Public Member Functions inherited from Mixins._ValidatingListBase
def __add__ (self, rhs)
 
def __init__ (self, arg, args)
 
def __setitem__ (self, key, value)
 
def append (self, x)
 
def extend (self, x)
 
def insert (self, i, x)
 
- Public Member Functions inherited from Mixins._ParameterTypeBase
def __init__ (self)
 
def __repr__ (self)
 
def configTypeName (self)
 
def dumpPython (self, options=PrintOptions())
 
def isFrozen (self)
 
def isModified (self)
 
def isTracked (self)
 
def pythonTypeName (self)
 
def resetModified (self)
 
def setIsFrozen (self)
 
def setIsTracked (self, trackness)
 

Private Member Functions

def __dummy (self, args)
 
def _place (self, label, process)
 

Static Private Member Functions

def _itemIsValid (item)
 

Private Attributes

 _tasks
 

Detailed Description

Definition at line 581 of file SequenceTypes.py.

Constructor & Destructor Documentation

def SequenceTypes.Schedule.__init__ (   self,
  arg,
  argv 
)

Definition at line 583 of file SequenceTypes.py.

583  def __init__(self,*arg,**argv):
584  super(Schedule,self).__init__(*arg)
586  theKeys = list(argv.keys())
587  if theKeys:
588  if len(theKeys) > 1 or theKeys[0] != "tasks":
589  raise RuntimeError("The Schedule constructor can only have one keyword argument after its Path and\nEndPath arguments and it must use the keyword 'tasks'")
590  taskList = argv["tasks"]
591  # Normally we want a list of tasks, but we let it also work if the value is one Task
592  if isinstance(taskList,Task):
593  self.associate(taskList)
594  else:
595  try:
596  # Call this just to check that taskList is a list or other iterable object
597  self.__dummy(*taskList)
598  except:
599  raise RuntimeError("The Schedule constructor argument with keyword 'tasks' must have a\nlist (or other iterable object) as its value")
600  if taskList:
601  self.associate(*taskList)
602 
def associate(self, tasks)
def __init__(self, arg, argv)
def __dummy(self, args)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run

Member Function Documentation

def SequenceTypes.Schedule.__dummy (   self,
  args 
)
private

Definition at line 603 of file SequenceTypes.py.

603  def __dummy(self, *args):
604  pass
605 
def __dummy(self, args)
def SequenceTypes.Schedule.__str__ (   self)
def SequenceTypes.Schedule._itemIsValid (   item)
staticprivate

Definition at line 612 of file SequenceTypes.py.

Referenced by Mixins._ValidatingListBase.__setitem__(), Mixins._ValidatingListBase._isValid(), Mixins._ValidatingListBase.append(), and Mixins._ValidatingListBase.insert().

612  def _itemIsValid(item):
613  return isinstance(item,Path) or isinstance(item,EndPath)
def SequenceTypes.Schedule._place (   self,
  label,
  process 
)
private

Definition at line 619 of file SequenceTypes.py.

619  def _place(self,label,process):
620  process.setPartialSchedule_(self,label)
def _place(self, label, process)
def SequenceTypes.Schedule.associate (   self,
  tasks 
)

Definition at line 606 of file SequenceTypes.py.

606  def associate(self,*tasks):
607  for task in tasks:
608  if not isinstance(task, Task):
609  raise TypeError("The associate function in the class Schedule only works with arguments of type Task")
610  self._tasks.add(task)
def associate(self, tasks)
def SequenceTypes.Schedule.contains (   self,
  mod 
)

Definition at line 629 of file SequenceTypes.py.

References SequenceTypes._ModuleSequenceType._tasks, and SequenceTypes.Schedule._tasks.

Referenced by LumiList.LumiList.__contains__().

629  def contains(self, mod):
630  visitor = ContainsModuleVisitor(mod)
631  for seq in self:
632  seq.visit(visitor)
633  if visitor.result():
634  return True
635  for t in self._tasks:
636  t.visit(visitor)
637  if visitor.result():
638  return True
639  return visitor.result()
def contains(self, mod)
def SequenceTypes.Schedule.copy (   self)

Definition at line 614 of file SequenceTypes.py.

References SequenceTypes._ModuleSequenceType._tasks, and SequenceTypes.Schedule._tasks.

614  def copy(self):
615  import copy
616  aCopy = copy.copy(self)
617  aCopy._tasks = OrderedSet(self._tasks)
618  return aCopy
def SequenceTypes.Schedule.dumpPython (   self,
  options = PrintOptions() 
)

Definition at line 640 of file SequenceTypes.py.

References SequenceTypes._ModuleSequenceType._tasks, SequenceTypes.Schedule._tasks, join(), and list().

640  def dumpPython(self, options=PrintOptions()):
641  pathNames = ['process.'+p.label_() for p in self]
642  if pathNames:
643  s=', '.join(pathNames)
644  else:
645  s = ''
646  associationContents = set()
647  for task in self._tasks:
648  if task.hasLabel_():
649  associationContents.add(_Labelable.dumpSequencePython(task, options))
650  else:
651  associationContents.add(task.dumpPythonNoNewline(options))
652  taskStrings = list()
653  for iString in sorted(associationContents):
654  taskStrings.append(iString)
655  if taskStrings and s:
656  return 'cms.Schedule(*[ ' + s + ' ], tasks=[' + ', '.join(taskStrings) + '])\n'
657  elif s:
658  return 'cms.Schedule(*[ ' + s + ' ])\n'
659  elif taskStrings:
660  return 'cms.Schedule(tasks=[' + ', '.join(taskStrings) + '])\n'
661  else:
662  return 'cms.Schedule()\n'
663 
def dumpPython(self, options=PrintOptions())
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def SequenceTypes.Schedule.moduleNames (   self)

Definition at line 621 of file SequenceTypes.py.

References SequenceTypes._ModuleSequenceType._tasks, and SequenceTypes.Schedule._tasks.

621  def moduleNames(self):
622  result = set()
623  visitor = NodeNameVisitor(result)
624  for seq in self:
625  seq.visit(visitor)
626  for t in self._tasks:
627  t.visit(visitor)
628  return result

Member Data Documentation

SequenceTypes.Schedule._tasks
private