  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
 | 
| dict[str, Node]  | build_tree (Mapping[str, DefectLogic] all_logic) | 
|   | 
| def  | walk (Node node, set[Node] visited, bool visit_primary, TextIO fd) | 
|   | 
| def  | dump_visited (TextIO fd, Node current_node, set[Node] nodes, Mapping[Union[str, int], str] descs, bool parents) | 
|   | 
| def  | build_dependency_graph (str output_dir, Node node, Mapping[Union[str, int], str] descs) | 
|   | 
| def  | build_parent_tree (str output_dir, Node node, Mapping[Union[str, int], str] descs) | 
|   | 
| def  | render_all_flags (str output_dir, dict[str, Node] all_nodes, Mapping[Union[str, int], str] descs) | 
|   | 
| def  | main () | 
|   | 
◆ build_dependency_graph()
      
        
          | def defects_dump_graph.build_dependency_graph  | 
          ( | 
          str  | 
          output_dir,  | 
        
        
           | 
           | 
          Node  | 
          node,  | 
        
        
           | 
           | 
          Mapping[Union[str, int], str]  | 
          descs  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 115 of file defects_dump_graph.py.
  117     with open(
"%s/%s.dot" % (output_dir, node.name), 
"w") 
as fd:
 
  118         print(f
"strict digraph {node.name} {{", file=fd)
 
  119         print(
"rankdir=LR;\n", file=fd)
 
  123         for parent 
in sorted(node.parents, key=Node.get_name):
 
  124             print(f
"{parent.name} -> {node.name}", file=fd)
 
  127         walk(node, visited, node.has_primary_children, fd)
 
 
 
 
◆ build_parent_tree()
      
        
          | def defects_dump_graph.build_parent_tree  | 
          ( | 
          str  | 
          output_dir,  | 
        
        
           | 
           | 
          Node  | 
          node,  | 
        
        
           | 
           | 
          Mapping[Union[str, int], str]  | 
          descs  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 133 of file defects_dump_graph.py.
  133 def build_parent_tree(output_dir: str, node: Node, descs: Mapping[Union[str, int], str]):
 
  135     visited = 
set([node])
 
  137     with open(f
"{output_dir}/{DEPENDSON_DIR}/{node.name}.dot", 
"w") 
as fd:
 
  138         def walk_parents(node):
 
  140             for parent 
in node.parents:
 
  141                 print(f
"{parent.name} -> {node.name}", file=fd)
 
  144         print(f
"strict digraph {node.name} {{", file=fd)
 
  145         print(
"rankdir=LR;\n", file=fd)
 
 
 
 
◆ build_tree()
      
        
          |  dict[str, Node] defects_dump_graph.build_tree  | 
          ( | 
          Mapping[str, DefectLogic]  | 
          all_logic | ) | 
           | 
        
      
 
Definition at line 65 of file defects_dump_graph.py.
   65 def build_tree(all_logic: Mapping[str, DefectLogic]) -> dict[str, Node]:
 
   67     all_nodes: dict[str, Node] = {}
 
   69     def make_primary(current_logic: str) -> Node:
 
   70         if current_logic 
in all_nodes:
 
   71             return all_nodes[current_logic]
 
   72         all_nodes[current_logic] = node = Node(current_logic)
 
   75     def explore_virtual(current_logic: str) -> Node:
 
   76         if current_logic 
in all_nodes:
 
   77             return all_nodes[current_logic]
 
   79         this_logic = all_logic[current_logic]
 
   80         all_nodes[current_logic] = node = Node(current_logic)
 
   82         for name 
in this_logic.clauses:
 
   84                 child = explore_virtual(name)
 
   86                 child = make_primary(name)
 
   88             child.parents.add(node)
 
   89             node.children.add(child)
 
   93     for name 
in all_logic:
 
 
 
 
◆ dump_visited()
      
        
          | def defects_dump_graph.dump_visited  | 
          ( | 
          TextIO  | 
          fd,  | 
        
        
           | 
           | 
          Node  | 
          current_node,  | 
        
        
           | 
           | 
          set[Node]  | 
          nodes,  | 
        
        
           | 
           | 
          Mapping[Union[str, int], str]  | 
          descs,  | 
        
        
           | 
           | 
          bool  | 
          parents  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 106 of file defects_dump_graph.py.
  106 def dump_visited(fd: TextIO, current_node: Node, nodes: set[Node],
 
  107                  descs: Mapping[Union[str, int], str], parents: bool):
 
  108     for node 
in sorted(nodes, key=Node.get_name):
 
  109         at_current_node = node.name == current_node.name
 
  110         description = descs.get(node.name, node.name)
 
  112         description = description.replace(
'\n', 
' ')
 
  113         print(node.dot(at_current_node, description, parents), file=fd)
 
 
 
 
◆ main()
      
        
          | def defects_dump_graph.main  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 163 of file defects_dump_graph.py.
  165     parser = ArgumentParser(description=
"Dump defect viewer information")
 
  167     parser.add_argument(
"-t", 
"--tag", default=
"HEAD", help=
"Defect tag")
 
  168     parser.add_argument(
"-o", 
"--output", default=
".", help=
"Directory to dump files")
 
  170     args = parser.parse_args()
 
  173     db = DefectsDB(tag=args.tag)
 
  175     descs = db.all_defect_descriptions
 
  178     all_nodes = 
build_tree(db.virtual_defect_logics)
 
  181     output_dir = 
"%s/%s" % (args.output, args.tag)
 
 
 
 
◆ render_all_flags()
      
        
          | def defects_dump_graph.render_all_flags  | 
          ( | 
          str  | 
          output_dir,  | 
        
        
           | 
           | 
          dict[str, Node]  | 
          all_nodes,  | 
        
        
           | 
           | 
          Mapping[Union[str, int], str]  | 
          descs  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 153 of file defects_dump_graph.py.
  153 def render_all_flags(output_dir: str, all_nodes: dict[str, Node], descs: Mapping[Union[str, int], str]):
 
  155     path = 
"%s/%s" % (output_dir, DEPENDSON_DIR)
 
  159     for _, node 
in sorted(all_nodes.items()):
 
 
 
 
◆ walk()
      
        
          | def defects_dump_graph.walk  | 
          ( | 
          Node  | 
          node,  | 
        
        
           | 
           | 
          set[Node]  | 
          visited,  | 
        
        
           | 
           | 
          bool  | 
          visit_primary,  | 
        
        
           | 
           | 
          TextIO  | 
          fd  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 98 of file defects_dump_graph.py.
   98 def walk(node: Node, visited: set[Node], visit_primary: bool, fd: TextIO):
 
  101     for subnode 
in sorted(node.children, key=Node.get_name):
 
  102         if subnode.virtual 
or (subnode.primary 
and visit_primary):
 
  103             print(f
"{node.name} -> {subnode.name}", file=fd)
 
  104             walk(subnode, visited, visit_primary, fd)
 
 
 
 
◆ DEPENDSON_DIR
      
        
          | string defects_dump_graph.DEPENDSON_DIR = "dependson" | 
        
      
 
 
 
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
 
def render_all_flags(str output_dir, dict[str, Node] all_nodes, Mapping[Union[str, int], str] descs)
 
def build_parent_tree(str output_dir, Node node, Mapping[Union[str, int], str] descs)
 
dict[str, Node] build_tree(Mapping[str, DefectLogic] all_logic)
 
def walk(Node node, set[Node] visited, bool visit_primary, TextIO fd)
 
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.
 
void print(char *figname, TCanvas *c1)
 
def build_dependency_graph(str output_dir, Node node, Mapping[Union[str, int], str] descs)
 
def dump_visited(TextIO fd, Node current_node, set[Node] nodes, Mapping[Union[str, int], str] descs, bool parents)