ATLAS Offline Software
Loading...
Searching...
No Matches
defects_dump_graph.Node Class Reference
Inheritance diagram for defects_dump_graph.Node:
Collaboration diagram for defects_dump_graph.Node:

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, str name)
str get_name (self)
bool virtual (self)
bool primary (self)
bool has_primary_children (self)
bool only_primary_children (self)
 __repr__ (self)
str dot (self, current_node=False, str tooltip="", bool viewing_dependents=False)

Public Attributes

 name = name
 children = set()
 parents = set()

Detailed Description

Definition at line 13 of file defects_dump_graph.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

defects_dump_graph.Node.__init__ ( self,
str name )

Definition at line 14 of file defects_dump_graph.py.

14 def __init__(self, name: str):
15 self.name = name
16 self.children = set()
17 self.parents = set()
18
STL class.

Member Function Documentation

◆ __repr__()

defects_dump_graph.Node.__repr__ ( self)

Definition at line 38 of file defects_dump_graph.py.

38 def __repr__(self):
39 return (f'<Node {self.name} parents="{[n.name for n in self.parents]}" '
40 f'children="{[n.name for n in self.children]}">')
41

◆ dot()

str defects_dump_graph.Node.dot ( self,
current_node = False,
str tooltip = "",
bool viewing_dependents = False )

Definition at line 42 of file defects_dump_graph.py.

42 def dot(self, current_node=False, tooltip: str ="", viewing_dependents: bool =False) -> str:
43 import html
44 color = "grey" if self.primary else "white"
45 if current_node:
46 color = "darkslategray2" if viewing_dependents else "gold"
47
48 tooltip = ("[Virtual]" if self.virtual else "[Primary]") + " " + html.escape(tooltip, True)
49 label = self.name
50
51
52 if current_node:
53 # Clicking on the current node toggles between views
54 if viewing_dependents:
55 url = f"../{self.name}.svg"
56 label += r"\n[Deep dependants]"
57 else:
58 url = f"{DEPENDSON_DIR}/{self.name}.svg"
59 label += r"\n[Dependencies]"
60 else:
61 url = "%s.svg" % self.name
62
63 return f'{self.name} [fillcolor={color}, style=filled, URL="{url}", tooltip="{tooltip}", label="{label}"];'
64
Definition dot.py:1

◆ get_name()

str defects_dump_graph.Node.get_name ( self)

Definition at line 19 of file defects_dump_graph.py.

19 def get_name(self) -> str:
20 return self.name
21

◆ has_primary_children()

bool defects_dump_graph.Node.has_primary_children ( self)

Definition at line 31 of file defects_dump_graph.py.

31 def has_primary_children(self) -> bool:
32 return any(c.primary for c in self.children)
33

◆ only_primary_children()

bool defects_dump_graph.Node.only_primary_children ( self)

Definition at line 35 of file defects_dump_graph.py.

35 def only_primary_children(self) -> bool:
36 return all(c.primary for c in self.children)
37

◆ primary()

bool defects_dump_graph.Node.primary ( self)

Definition at line 27 of file defects_dump_graph.py.

27 def primary(self) -> bool:
28 return not self.virtual
29

◆ virtual()

bool defects_dump_graph.Node.virtual ( self)

Definition at line 23 of file defects_dump_graph.py.

23 def virtual(self) -> bool:
24 return bool(self.children)
25

Member Data Documentation

◆ children

defects_dump_graph.Node.children = set()

Definition at line 16 of file defects_dump_graph.py.

◆ name

defects_dump_graph.Node.name = name

Definition at line 15 of file defects_dump_graph.py.

◆ parents

defects_dump_graph.Node.parents = set()

Definition at line 17 of file defects_dump_graph.py.


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