ATLAS Offline Software
Loading...
Searching...
No Matches
navigation2dot.TE Class Reference
Collaboration diagram for navigation2dot.TE:

Public Member Functions

 __init__ (self, s)
 node (self)
 edges (self)
 __str__ (self)

Public Attributes

 tename = teName(tok[0].split(':')[1])
 active = bool(int(tok[1].split(':')[1]))
 error = bool(int(tok[2].split(':')[1]))
 ptr = tok[3].split(':')[1]
 roi = tok[5].split(':')[1]
list relations = []
bool terminal = False
list features = []

Detailed Description

Definition at line 66 of file navigation2dot.py.

Constructor & Destructor Documentation

◆ __init__()

navigation2dot.TE.__init__ ( self,
s )

Definition at line 67 of file navigation2dot.py.

67 def __init__(self, s):
68 # print s
69 # this si typical line it has to deal with: id:0;active:1;error:0;ptr:0x9606b98;#seeds:4,0x9606ce0 0x9607338 0x96075b0 0x96077e8 #seededBy:0;#RoI:0;#features:1 CLID:242645981 idx:0:0:1 label:"OPI_L2";
70 tok = s.split(';')
71 #print tok
72 self.tename = teName(tok[0].split(':')[1])
73 self.active = bool(int(tok[1].split(':')[1]))
74 self.error = bool(int(tok[2].split(':')[1]))
75 self.ptr = tok[3].split(':')[1]
76 self.roi = tok[5].split(':')[1]
77 # find out relations
78 self.relations = []
79 self.terminal = False
80 seeds = tok[4].split(',')[0].split(':')[1]
81 if seeds is '0':
82 self.terminal = True
83 else:
84 self.relations = tok[4].split(',')[1].split(' ')[0:-1]
85
86 # find out features attached
87 #print tok
88 self.features = []
89 global options
90 passed=False
91 if options['drawFeatures']:
92 for part in tok:
93 if 'keyprints' in part:
94 passed=True
95 clid = 0
96 label = ''
97 idx=''
98 for field in part.split(" "):
99 if field.find("CLID") is not -1:
100 clid = field.split(":")[1].lstrip(' ').lstrip(' ')
101 elif field.find("label") is not -1:
102 label = field.split(":")[1].rstrip("\"").lstrip("\"")
103 elif field.find("idx") is not -1:
104 idx=field
105 if clid is not 0:
106 #print (featureClassName(clid), label, idx, passed)
107 self.features.append( (featureClassName(clid), label, idx, ('','*')[passed]) )
108
109 # print self.features
110
111 # print self.tename, self.active, self.ptr, self.relations
112
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177

Member Function Documentation

◆ __str__()

navigation2dot.TE.__str__ ( self)

Definition at line 156 of file navigation2dot.py.

156 def __str__(self):
157 r = self.node()
158 if r:
159 return r + self.edges()
160 else:
161 return ""
162
163

◆ edges()

navigation2dot.TE.edges ( self)
Draws node and edges. 

Definition at line 149 of file navigation2dot.py.

149 def edges (self):
150 """ Draws node and edges. """
151 line = ''
152 for rel in self.relations:
153 line += 'X'+self.ptr + ' -> X' + rel + '\n'
154 return line
155

◆ node()

navigation2dot.TE.node ( self)
Draws node of the graph. 

Definition at line 113 of file navigation2dot.py.

113 def node(self):
114 """ Draws node of the graph. """
115 global options
116
117 if options['regex'].search(self.tename) == None and self.tename != '0':
118 # print "rejecting TE which of name ", self.tename, ' due to regex'
119 return None
120
121 nodename = 'X'+ str(self.ptr)
122 line = nodename +' [ label="{TE: ' + self.tename
123
124 line += reduce(lambda x,y: x + "|"+y[0]+ "(" +y[1] + ' '+ y[2]+str(y[3])+")", self.features, "")
125 line += '}", style=filled, '
126
127 # special nodes
128 if self.tename is '0':
129 line += 'fillcolor=pink, '
130 else:
131 if self.active:
132 line += 'color=green, '
133 else:
134 line += 'color=plum, '
135
136 # error color scheme
137 if self.error:
138 line += 'fillcolor=red, '
139 else:
140 line += 'fillcolor=palegreen, '
141
142
143
144
145 line += 'shape=record'
146 line += ']\n'
147 return line
148
Definition node.h:24
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles
Definition hcg.cxx:739

Member Data Documentation

◆ active

navigation2dot.TE.active = bool(int(tok[1].split(':')[1]))

Definition at line 73 of file navigation2dot.py.

◆ error

navigation2dot.TE.error = bool(int(tok[2].split(':')[1]))

Definition at line 74 of file navigation2dot.py.

◆ features

list navigation2dot.TE.features = []

Definition at line 88 of file navigation2dot.py.

◆ ptr

navigation2dot.TE.ptr = tok[3].split(':')[1]

Definition at line 75 of file navigation2dot.py.

◆ relations

list navigation2dot.TE.relations = []

Definition at line 78 of file navigation2dot.py.

◆ roi

navigation2dot.TE.roi = tok[5].split(':')[1]

Definition at line 76 of file navigation2dot.py.

◆ tename

navigation2dot.TE.tename = teName(tok[0].split(':')[1])

Definition at line 72 of file navigation2dot.py.

◆ terminal

bool navigation2dot.TE.terminal = False

Definition at line 79 of file navigation2dot.py.


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