CMS 3D CMS Logo

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__ (self)
 
def enter (self, visitee)
 
def leave (self, visitee)
 
def setLabel (self, label)
 

Public Attributes

 invalidModulesOnFinalpaths
 

Private Attributes

 __label
 
 _levelInTasks
 

Detailed Description

Definition at line 71 of file SequenceVisitors.py.

Constructor & Destructor Documentation

◆ __init__()

def SequenceVisitors.FinalPathValidator.__init__ (   self)

Definition at line 72 of file SequenceVisitors.py.

72  def __init__(self):
73  self.__label = ''
74  self._levelInTasks = 0
75  self.invalidModulesOnFinalpaths = []
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.FinalPathValidator.enter (   self,
  visitee 
)

Definition at line 78 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.ModuleNodeOnConditionalTaskVisitor._levelInTasks, SequenceTypes.ModuleNodeNotOnTaskVisitor._levelInTasks, SequenceTypes.ExpandVisitor._levelInTasks, SequenceTypes.DecoratedNodeNameVisitor._levelInTasks, SequenceTypes.DecoratedNodeNamePlusVisitor._levelInTasks, mps_setup.append, and SequenceVisitors.FinalPathValidator.invalidModulesOnFinalpaths.

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

◆ leave()

def SequenceVisitors.FinalPathValidator.leave (   self,
  visitee 
)

◆ setLabel()

def SequenceVisitors.FinalPathValidator.setLabel (   self,
  label 
)

Definition at line 76 of file SequenceVisitors.py.

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

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

Member Data Documentation

◆ __label

SequenceVisitors.FinalPathValidator.__label
private

◆ _levelInTasks

SequenceVisitors.FinalPathValidator._levelInTasks
private

◆ invalidModulesOnFinalpaths

SequenceVisitors.FinalPathValidator.invalidModulesOnFinalpaths

Definition at line 75 of file SequenceVisitors.py.

Referenced by SequenceVisitors.FinalPathValidator.enter().