ATLAS Offline Software
Trigger
TrigT1
Global
GlobalSimulation
python
dot.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
# write out a Digraph in dot format
4
5
def
dot
(G, fn, nodesToHighlight=[]):
6
"""dot() is a function to output a graph which suppords adj() that writes
7
out a .dot file for graph visualisation"""
8
9
lines = [
10
"digraph G{\n"
,
11
"layout=twopi ranksep=3 ratio=auto\n"
]
12
13
for
v
in
range
(G.V):
14
15
for
w
in
G.adj(v):
16
line =
'%d -> %d;'
% (v, w)
17
lines.append(line)
18
19
for
v
in
nodesToHighlight:
20
assert
v < G.V
21
lines.append(
'%d [color=red, style=filled];'
% v)
22
23
lines.append(
'}\n'
)
24
25
text =
'\n'
.
join
(lines)
26
27
with
open
(fn,
'w'
)
as
fh:
28
fh.write(text)
29
plotBeamSpotVxVal.range
range
Definition:
plotBeamSpotVxVal.py:195
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition:
dot.py:5
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
Trk::open
@ open
Definition:
BinningType.h:40
Generated on Wed Jan 8 2025 21:09:05 for ATLAS Offline Software by
1.8.18