The Gaudi Framework  master (37c0b60a)
ControlFlow.ControlFlowNode Class Reference

(c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE". More...

Inheritance diagram for ControlFlow.ControlFlowNode:
Collaboration diagram for ControlFlow.ControlFlowNode:

Public Member Functions

def __and__ (self, rhs)
 
def __or__ (self, rhs)
 
def __invert__ (self)
 
def __rshift__ (self, rhs)
 
def visitNode (self, visitor)
 
def __eq__ (self, other)
 
def __hash__ (self)
 
def getFullName (self)
 

Private Member Functions

def _visitSubNodes (self, visitor)
 

Private Attributes

 _fullname
 

Detailed Description

(c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".

# # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. #

Basic entry in the control flow graph.

Definition at line 18 of file ControlFlow.py.

Member Function Documentation

◆ __and__()

def ControlFlow.ControlFlowNode.__and__ (   self,
  rhs 
)

Reimplemented in ControlFlow.ControlFlowBool.

Definition at line 23 of file ControlFlow.py.

23  def __and__(self, rhs):
24  if rhs is CFTrue:
25  return self
26  elif rhs is CFFalse:
27  return CFFalse
28  return AndNode(self, rhs)
29 

◆ __eq__()

def ControlFlow.ControlFlowNode.__eq__ (   self,
  other 
)

Definition at line 51 of file ControlFlow.py.

51  def __eq__(self, other):
52  return repr(self) == repr(other)
53 

◆ __hash__()

def ControlFlow.ControlFlowNode.__hash__ (   self)
Return a unique identifier for this object.

As we use the `repr` of this object to check for equality, we use it
here to define uniqueness.

Definition at line 54 of file ControlFlow.py.

54  def __hash__(self):
55  """Return a unique identifier for this object.
56 
57  As we use the `repr` of this object to check for equality, we use it
58  here to define uniqueness.
59  """
60  # The hash of the 1-tuple containing the repr of this object
61  return hash((repr(self),))
62 

◆ __invert__()

def ControlFlow.ControlFlowNode.__invert__ (   self)

Reimplemented in ControlFlow.ControlFlowBool.

Definition at line 37 of file ControlFlow.py.

37  def __invert__(self):
38  return InvertNode(self)
39 

◆ __or__()

def ControlFlow.ControlFlowNode.__or__ (   self,
  rhs 
)

Reimplemented in ControlFlow.ControlFlowBool.

Definition at line 30 of file ControlFlow.py.

30  def __or__(self, rhs):
31  if rhs is CFFalse:
32  return self
33  elif rhs is CFTrue:
34  return CFTrue
35  return OrNode(self, rhs)
36 

◆ __rshift__()

def ControlFlow.ControlFlowNode.__rshift__ (   self,
  rhs 
)

Definition at line 40 of file ControlFlow.py.

40  def __rshift__(self, rhs):
41  return OrderedNode(self, rhs)
42 

◆ _visitSubNodes()

def ControlFlow.ControlFlowNode._visitSubNodes (   self,
  visitor 
)
private

Reimplemented in ControlFlow.seq, ControlFlow.par, ControlFlow.ignore, ControlFlow.InvertNode, ControlFlow.OrNode, ControlFlow.AndNode, and ControlFlow.OrderedNode.

Definition at line 48 of file ControlFlow.py.

48  def _visitSubNodes(self, visitor):
49  pass
50 

◆ getFullName()

def ControlFlow.ControlFlowNode.getFullName (   self)
Allow use of an expression as an algorihtm/sequence in a Gaudi job
configuration.

Convert the expression in nested sequencers and return the full name of
the top one.

Definition at line 63 of file ControlFlow.py.

63  def getFullName(self):
64  """
65  Allow use of an expression as an algorihtm/sequence in a Gaudi job
66  configuration.
67 
68  Convert the expression in nested sequencers and return the full name of
69  the top one.
70  """
71  if not hasattr(self, "_fullname"):
72  from GaudiKernel.Configurable import makeSequences
73 
74  self._fullname = makeSequences(self).getFullName()
75  return self._fullname
76 
77 

◆ visitNode()

def ControlFlow.ControlFlowNode.visitNode (   self,
  visitor 
)

Definition at line 43 of file ControlFlow.py.

43  def visitNode(self, visitor):
44  visitor.enter(self)
45  self._visitSubNodes(visitor)
46  visitor.leave(self)
47 

Member Data Documentation

◆ _fullname

ControlFlow.ControlFlowNode._fullname
private

Definition at line 74 of file ControlFlow.py.


The documentation for this class was generated from the following file:
GaudiKernel.Configurable.makeSequences
def makeSequences(expression)
Definition: Configurable.py:1842
GaudiKernel.Configurable
Definition: Configurable.py:1