The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
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

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

Protected Member Functions

 _visitSubNodes (self, visitor)
 

Protected Attributes

 _fullname = makeSequences(self).getFullName()
 

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__()

ControlFlow.ControlFlowNode.__and__ ( self,
rhs )

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__()

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__()

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__()

ControlFlow.ControlFlowNode.__invert__ ( self)

Definition at line 37 of file ControlFlow.py.

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

◆ __or__()

ControlFlow.ControlFlowNode.__or__ ( self,
rhs )

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__()

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()

ControlFlow.ControlFlowNode._visitSubNodes ( self,
visitor )
protected

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

Definition at line 48 of file ControlFlow.py.

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

◆ getFullName()

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()

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 = makeSequences(self).getFullName()
protected

Definition at line 74 of file ControlFlow.py.


The documentation for this class was generated from the following file: