ATLAS Offline Software
Loading...
Searching...
No Matches
python.HypoToolAnalyser.HypoToolAnalyser Class Reference
Collaboration diagram for python.HypoToolAnalyser.HypoToolAnalyser:

Public Member Functions

 __init__ (self, tool)
 tables (self)
 __str__ (self)

Public Attributes

 connections = defaultdict(list)
dict node_table = {}
int nid = 0
int cid = 1

Protected Member Functions

 _process (self, tool)

Detailed Description

 "Look inside" a jet hypo tool, and post its contents, including all
nested classes to two tables:
- self.node_table : a look up table of node id (int)  to AlgTool
- self.connected: a look up table of connections. Keys are node ids,
 values are the list of node ids of tool contained within the tool
with node id given by the key.

example (tool name replaces tool instance):

node_table:

0 HLT_j80_j60_L1J15
1 helper_tool_0
2 HelperToolConfigTool_0
3 RepeatedConditionConfigTool_0
4 all_0
5 RepeatedConditionConfigTool_2
6 eta_0
7 et_0
8 RepeatedConditionConfigTool_3
9 eta_1
10 et_1
11 RepeatedConditionConfigTool_1
12 RepeatedConditionConfigTool_4
13 RepeatedConditionConfigTool_5


connections:

0 [1]
1 [2]
2 [3, 5, 8, 11, 12, 13]
3 [4]
5 [6, 7]
8 [9, 10] 

Definition at line 5 of file HypoToolAnalyser.py.

Constructor & Destructor Documentation

◆ __init__()

python.HypoToolAnalyser.HypoToolAnalyser.__init__ ( self,
tool )

Definition at line 42 of file HypoToolAnalyser.py.

42 def __init__(self, tool):
43 self.connections = defaultdict(list)
44 self.node_table = {}
45 self.nid = 0
46 self.cid = 1
47
48 self._process(tool)
49

Member Function Documentation

◆ __str__()

python.HypoToolAnalyser.HypoToolAnalyser.__str__ ( self)

Definition at line 77 of file HypoToolAnalyser.py.

77 def __str__(self):
78
79 s = [self.__class__.__name__, '\nnode_table:\n']
80 for k, v in self.node_table.items():
81 s.append('%3d: %s' % (k, v.name))
82
83 s.append('\nconnections:\n')
84
85 for k, v in self.connections.items():
86 s.append('%3d: %s' % (k, str(v)))
87
88 return ('\n'.join(s))
89

◆ _process()

python.HypoToolAnalyser.HypoToolAnalyser._process ( self,
tool )
protected

Definition at line 50 of file HypoToolAnalyser.py.

50 def _process(self, tool):
51
52 self.node_table[self.nid] = tool
53
54
55 children = []
56 for k, v in tool._properties.items():
57 if v.__class__.__name__ in (
58 'TrigJetHypoToolHelperNoGrouper',
59 'TrigJetHypoToolConfig_conditionfilter',
60 'TrigJetHypoToolConfig_passthroughfilter',
61 ):
62 children.append(v)
63
64 elif v.__class__.__name__== 'PrivateToolHandleArray':
65 children.extend(v)
66
67 pid = self.nid
68
69 for c in children:
70 self.nid += 1
71 self.connections[pid].append(self.nid)
72 self._process(c)
73

◆ tables()

python.HypoToolAnalyser.HypoToolAnalyser.tables ( self)

Definition at line 74 of file HypoToolAnalyser.py.

74 def tables(self):
75 return self.node_table, self.connections
76

Member Data Documentation

◆ cid

int python.HypoToolAnalyser.HypoToolAnalyser.cid = 1

Definition at line 46 of file HypoToolAnalyser.py.

◆ connections

python.HypoToolAnalyser.HypoToolAnalyser.connections = defaultdict(list)

Definition at line 43 of file HypoToolAnalyser.py.

◆ nid

python.HypoToolAnalyser.HypoToolAnalyser.nid = 0

Definition at line 45 of file HypoToolAnalyser.py.

◆ node_table

python.HypoToolAnalyser.HypoToolAnalyser.node_table = {}

Definition at line 44 of file HypoToolAnalyser.py.


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