CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes
SequenceVisitors.EndPathValidator Class Reference
Inheritance diagram for SequenceVisitors.EndPathValidator:

Public Member Functions

def __init__ (self)
 
def enter (self, visitee)
 
def leave (self, visitee)
 
def setLabel (self, label)
 

Public Attributes

 filtersOnEndpaths
 

Private Attributes

 __label
 
 _levelInTasks
 

Static Private Attributes

 _presetFilters
 

Detailed Description

Definition at line 41 of file SequenceVisitors.py.

Constructor & Destructor Documentation

◆ __init__()

def SequenceVisitors.EndPathValidator.__init__ (   self)

Definition at line 43 of file SequenceVisitors.py.

43  def __init__(self):
44  self.filtersOnEndpaths = []
45  self.__label = ''
46  self._levelInTasks = 0
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ enter()

def SequenceVisitors.EndPathValidator.enter (   self,
  visitee 
)

Definition at line 49 of file SequenceVisitors.py.

References SequenceVisitors.PathValidator.__label, SequenceVisitors.EndPathValidator.__label, Mixins._Labelable.__label, SequenceVisitors.EndPathValidator._levelInTasks, SequenceTypes.ModuleNodeOnTaskVisitor._levelInTasks, SequenceTypes.ModuleNodeOnConditionalTaskVisitor._levelInTasks, SequenceTypes.ModuleNodeNotOnTaskVisitor._levelInTasks, SequenceTypes.ExpandVisitor._levelInTasks, SequenceTypes.DecoratedNodeNameVisitor._levelInTasks, SequenceTypes.DecoratedNodeNamePlusVisitor._levelInTasks, SequenceVisitors.EndPathValidator._presetFilters, mps_setup.append, and SequenceVisitors.EndPathValidator.filtersOnEndpaths.

49  def enter(self,visitee):
50  if visitee.isLeaf():
51  if isinstance(visitee, _Labelable):
52  if not visitee.hasLabel_():
53  raise ValueError("EndPath "+self.__label+"contains a module of type '"+visitee.type_()+"' which has\nno assigned label.")
54  elif isinstance(visitee, Service):
55  if not visitee._inProcess:
56  raise ValueError("EndPath "+self.__label+"contains a service of type '"+visitee.type_()+"' which is not attached to the process.\n")
57  if isinstance(visitee, Task):
58  self._levelInTasks += 1
59  if self._levelInTasks > 0:
60  return
61  if isinstance(visitee,EDFilter):
62  if (visitee.type_() in self._presetFilters):
63  if (visitee.type_() not in self.filtersOnEndpaths):
64  self.filtersOnEndpaths.append(visitee.type_())

◆ leave()

def SequenceVisitors.EndPathValidator.leave (   self,
  visitee 
)

◆ setLabel()

def SequenceVisitors.EndPathValidator.setLabel (   self,
  label 
)

Definition at line 47 of file SequenceVisitors.py.

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

47  def setLabel(self,label):
48  self.__label = "'"+label+"' "

Member Data Documentation

◆ __label

SequenceVisitors.EndPathValidator.__label
private

◆ _levelInTasks

SequenceVisitors.EndPathValidator._levelInTasks
private

◆ _presetFilters

SequenceVisitors.EndPathValidator._presetFilters
staticprivate

Definition at line 42 of file SequenceVisitors.py.

Referenced by SequenceVisitors.EndPathValidator.enter().

◆ filtersOnEndpaths

SequenceVisitors.EndPathValidator.filtersOnEndpaths

Definition at line 44 of file SequenceVisitors.py.

Referenced by SequenceVisitors.EndPathValidator.enter().