ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
defects_dump_graph.Node Class Reference
Inheritance diagram for defects_dump_graph.Node:
Collaboration diagram for defects_dump_graph.Node:

Public Member Functions

def __init__ (self, str name)
 
str get_name (self)
 
bool virtual (self)
 
bool primary (self)
 
bool has_primary_children (self)
 
bool only_primary_children (self)
 
def __repr__ (self)
 
str dot (self, current_node=False, str tooltip="", bool viewing_dependents=False)
 

Public Attributes

 name
 
 children
 
 parents
 

Detailed Description

Definition at line 13 of file defects_dump_graph.py.

Constructor & Destructor Documentation

◆ __init__()

def 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 

Member Function Documentation

◆ __repr__()

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

◆ 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

Definition at line 16 of file defects_dump_graph.py.

◆ name

defects_dump_graph.Node.name

Definition at line 15 of file defects_dump_graph.py.

◆ parents

defects_dump_graph.Node.parents

Definition at line 17 of file defects_dump_graph.py.


The documentation for this class was generated from the following file:
StateLessPT_NewConfig.primary
primary
Definition: StateLessPT_NewConfig.py:228
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition: dot.py:5
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60