ATLAS Offline Software
Loading...
Searching...
No Matches
python.trfGraph.executorNode Class Reference

Initialise a graph node from an executor. More...

Inheritance diagram for python.trfGraph.executorNode:
Collaboration diagram for python.trfGraph.executorNode:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 __init__ (self, executor=None, weight=None)
 executorNode constructor
 inData (self)
 name (self)
 outData (self)
 inputDataTypes (self)
 outputDataTypes (self)
 connections (self)
 weights (self)
 addConnection (self, toExe, data, direction='out')
 Add a new edge connection for this node.
 delConnection (self, toExe, direction='out')
 Delete a connection from this node.
 resetConnections (self)
 Delete all connections.
 __str__ (self)
 __repr__ (self)

Public Attributes

 inData

Protected Member Functions

 _flattenSet (self, startSet)
 Take a list and return all simple members plus the members of any list/tuples in the set (i.e., flatten out multiple input tuples)

Protected Attributes

 _name = name
 _inData = set(inData)
 _outData = set(outData)
dict _inWeights = {}
 _inputDataTypes = self._flattenSet(self._inData)
 _outputDataTypes = self._flattenSet(self._outData)
dict _connections = {'in': {}, 'out': {}}

Detailed Description

Initialise a graph node from an executor.

Definition at line 530 of file trfGraph.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

python.trfGraph.executorNode.__init__ ( self,
executor = None,
weight = None )

executorNode constructor

Note
This is just a wrapper to call the parent class's constructor with the extracted input and output data types
Parameters
executorExecutor used to make this node
weightWeight specifier

Definition at line 536 of file trfGraph.py.

536 def __init__(self, executor = None, weight = None):
537 super(executorNode, self).__init__(executor.name, executor.inData, executor.outData, weight)

Member Function Documentation

◆ __repr__()

python.trfGraph.graphNode.__repr__ ( self)
inherited

Definition at line 525 of file trfGraph.py.

525 def __repr__(self):
526 return '{0} (dataIn {1}, weights {2}; dataOut {3}; connect {4})'.format(self._name, self._inData, self._inWeights, self._outData, self._connections)
527
528

◆ __str__()

python.trfGraph.graphNode.__str__ ( self)
inherited

Definition at line 522 of file trfGraph.py.

522 def __str__(self):
523 return '{0} (dataIn {1} -> dataOut {2})'.format(self._name, self._inData, self._outData)
524

◆ _flattenSet()

python.trfGraph.graphNode._flattenSet ( self,
startSet )
protectedinherited

Take a list and return all simple members plus the members of any list/tuples in the set (i.e., flatten out multiple input tuples)

Definition at line 513 of file trfGraph.py.

513 def _flattenSet(self, startSet):
514 flatData = set()
515 for data in startSet:
516 if isinstance(data, (list, tuple)):
517 flatData.update(data)
518 else:
519 flatData.update([data])
520 return flatData
521
STL class.

◆ addConnection()

python.trfGraph.graphNode.addConnection ( self,
toExe,
data,
direction = 'out' )
inherited

Add a new edge connection for this node.

Parameters

c toExe Other node for this edge

Parameters

c data Data which connects these nodes (iterable), converted to set object

Parameters

c direction If this is an incoming or outgoing edge for this node

Definition at line 498 of file trfGraph.py.

498 def addConnection(self, toExe, data, direction = 'out'):
499 self._connections[direction][toExe] = set(data)
500

◆ connections()

python.trfGraph.graphNode.connections ( self)
inherited

Definition at line 487 of file trfGraph.py.

487 def connections(self):
488 return self._connections
489

◆ delConnection()

python.trfGraph.graphNode.delConnection ( self,
toExe,
direction = 'out' )
inherited

Delete a connection from this node.

Parameters

c toExe Other node for this vertex

Parameters

c direction If this is an incoming or outgoing edge for this node

Definition at line 504 of file trfGraph.py.

504 def delConnection(self, toExe, direction = 'out'):
505 del self._connections[direction][toExe]
506

◆ inData()

python.trfGraph.graphNode.inData ( self)
inherited

Definition at line 471 of file trfGraph.py.

471 def inData(self):
472 return self._inData
473

◆ inputDataTypes()

python.trfGraph.graphNode.inputDataTypes ( self)
inherited

Definition at line 479 of file trfGraph.py.

479 def inputDataTypes(self):
480 return self._flattenSet(self.inData)
481

◆ name()

python.trfGraph.graphNode.name ( self)
inherited

Definition at line 467 of file trfGraph.py.

467 def name(self):
468 return self._name
469

◆ outData()

python.trfGraph.graphNode.outData ( self)
inherited

Definition at line 475 of file trfGraph.py.

475 def outData(self):
476 return self._outData
477

◆ outputDataTypes()

python.trfGraph.graphNode.outputDataTypes ( self)
inherited

Definition at line 483 of file trfGraph.py.

483 def outputDataTypes(self):
484 return self._flattenSet(self._outData)
485

◆ resetConnections()

python.trfGraph.graphNode.resetConnections ( self)
inherited

Delete all connections.

Definition at line 508 of file trfGraph.py.

508 def resetConnections(self):
509 self._connections = {'in': {}, 'out': {}}
510

◆ weights()

python.trfGraph.graphNode.weights ( self)
inherited

Definition at line 491 of file trfGraph.py.

491 def weights(self):
492 return self._inWeights
493

Member Data Documentation

◆ _connections

python.trfGraph.graphNode._connections = {'in': {}, 'out': {}}
protectedinherited

Definition at line 464 of file trfGraph.py.

◆ _inData

python.trfGraph.graphNode._inData = set(inData)
protectedinherited

Definition at line 441 of file trfGraph.py.

◆ _inputDataTypes

python.trfGraph.graphNode._inputDataTypes = self._flattenSet(self._inData)
protectedinherited

Definition at line 457 of file trfGraph.py.

◆ _inWeights

python.trfGraph.graphNode._inWeights = {}
protectedinherited
Note
_inWeights takes the form of a dictionary, keyed by input data type and giving the relative cost of executing this node with those input data types.

Definition at line 446 of file trfGraph.py.

◆ _name

python.trfGraph.graphNode._name = name
protectedinherited

Definition at line 440 of file trfGraph.py.

◆ _outData

python.trfGraph.graphNode._outData = set(outData)
protectedinherited

Definition at line 442 of file trfGraph.py.

◆ _outputDataTypes

python.trfGraph.graphNode._outputDataTypes = self._flattenSet(self._outData)
protectedinherited

Definition at line 458 of file trfGraph.py.

◆ inData

python.trfGraph.graphNode.inData
inherited

Definition at line 480 of file trfGraph.py.


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