CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Private Attributes
SequenceVisitors.FinalPathValidator Class Reference
Inheritance diagram for SequenceVisitors.FinalPathValidator:

Public Member Functions

def __init__
 
def enter
 
def leave
 
def setLabel
 

Public Attributes

 filtersOnFinalpaths
 
 producersOnFinalpaths
 

Private Attributes

 __label
 
 _levelInTasks
 

Detailed Description

Definition at line 71 of file SequenceVisitors.py.

Constructor & Destructor Documentation

def SequenceVisitors.FinalPathValidator.__init__ (   self)

Member Function Documentation

def SequenceVisitors.FinalPathValidator.enter (   self,
  visitee 
)

Definition at line 79 of file SequenceVisitors.py.

References SequenceVisitors.PathValidator.__label, SequenceVisitors.EndPathValidator.__label, SequenceVisitors.FinalPathValidator.__label, Mixins._Labelable.__label, SequenceVisitors.EndPathValidator._levelInTasks, SequenceVisitors.FinalPathValidator._levelInTasks, SequenceTypes.ModuleNodeOnTaskVisitor._levelInTasks, SequenceTypes.ModuleNodeNotOnTaskVisitor._levelInTasks, SequenceTypes.ExpandVisitor._levelInTasks, SequenceTypes.DecoratedNodeNameVisitor._levelInTasks, and SequenceTypes.DecoratedNodeNamePlusVisitor._levelInTasks.

79 
80  def enter(self,visitee):
81  if visitee.isLeaf():
82  if isinstance(visitee, _Labelable):
83  if not visitee.hasLabel_():
84  raise ValueError("FinalPath "+self.__label+"contains a module of type '"+visitee.type_()+"' which has\nno assigned label.")
85  elif isinstance(visitee, Service):
86  if not visitee._inProcess:
87  raise ValueError("FinalPath "+self.__label+"contains a service of type '"+visitee.type_()+"' which is not attached to the process.\n")
88  if isinstance(visitee, Task):
89  self._levelInTasks += 1
90  if self._levelInTasks > 0:
91  return
92  if isinstance(visitee,EDFilter):
93  self.filtersOnFinalpaths.append(visitee.type_())
94  if isinstance(visitee,EDProducer):
self.producersOnFinalpaths.append(visitee.type_())
def SequenceVisitors.FinalPathValidator.leave (   self,
  visitee 
)

Definition at line 95 of file SequenceVisitors.py.

References SequenceVisitors.EndPathValidator._levelInTasks, SequenceVisitors.FinalPathValidator._levelInTasks, SequenceTypes.ModuleNodeOnTaskVisitor._levelInTasks, SequenceTypes.ModuleNodeNotOnTaskVisitor._levelInTasks, SequenceTypes.ExpandVisitor._levelInTasks, SequenceTypes.DecoratedNodeNameVisitor._levelInTasks, and SequenceTypes.DecoratedNodeNamePlusVisitor._levelInTasks.

95 
96  def leave(self,visitee):
97  if self._levelInTasks > 0:
98  if isinstance(visitee, Task):
99  self._levelInTasks -= 1
def SequenceVisitors.FinalPathValidator.setLabel (   self,
  label 
)

Definition at line 77 of file SequenceVisitors.py.

References SequenceVisitors.PathValidator.__label, SequenceVisitors.EndPathValidator.__label, SequenceVisitors.FinalPathValidator.__label, and Mixins._Labelable.__label.

Referenced by SequenceTypes.DummyModule.__init__(), and SequenceTypes.DummyBooleanModule.__init__().

77 
78  def setLabel(self,label):
self.__label = "'"+label+"' "

Member Data Documentation

SequenceVisitors.FinalPathValidator.__label
private

Definition at line 73 of file SequenceVisitors.py.

Referenced by Mixins._ValidatingListBase._labelIfAny(), SequenceVisitors.FinalPathValidator.enter(), and SequenceVisitors.FinalPathValidator.setLabel().

SequenceVisitors.FinalPathValidator._levelInTasks
private

Definition at line 74 of file SequenceVisitors.py.

Referenced by SequenceVisitors.FinalPathValidator.enter(), and SequenceVisitors.FinalPathValidator.leave().

SequenceVisitors.FinalPathValidator.filtersOnFinalpaths

Definition at line 75 of file SequenceVisitors.py.

SequenceVisitors.FinalPathValidator.producersOnFinalpaths

Definition at line 76 of file SequenceVisitors.py.