10#include <tracking/trackFindingVXD/segmentNetwork/CACell.h>
11#include <tracking/trackFindingVXD/segmentNetwork/DirectedNodeNetwork.h>
36 template<
class NodeEntryType>
40 std::string fullOut =
"digraph G {\n";
42 "ranksep=\"0.2\" edge[labelfontsize=\"8\" fontsize=\"8\" arrowsize=\"0.9\"] nodesep=\"0.2\" node[shape=\"box\" width=\"0\" height=\"0\" fontsize=\"10\"]\n";
44 for (
auto* node : network) {
45 fullOut +=
"\"" + node->getEntry().getName() +
"\"" +
47 node->getEntry().getName() +
49 std::to_string(node->getMetaInfo().getState()) +
51 std::to_string(node->getMetaInfo().isSeed()) +
55 for (
auto* node : network) {
56 for (
auto* innerNode : node->getInnerNodes()) {
57 auto innerEntry = innerNode->getEntry();
58 std::string arrowStyle = (node->getMetaInfo().getState() == (innerNode->getMetaInfo().getState() + 1)) ?
"" :
" [style=dotted]";
59 fullOut +=
"\"" + node->getEntry().getName() +
"\" -> \"" + innerEntry.getName() +
"\"" + arrowStyle +
";\n";
62 fullOut +=
"labelloc=\"t\";\nlabel=\"" + fName +
"\";\n";
66 ofs.open(fName +
".gv", std::ofstream::out | std::ofstream::trunc);
73 template<
class NodeEntryType,
class AnyMetaInfo>
77 std::string fullOut =
"digraph G {\n";
79 "ranksep=\"0.2\" edge[labelfontsize=\"8\" fontsize=\"8\" arrowsize=\"0.9\"] nodesep=\"0.2\" node[shape=\"box\" width=\"0\" height=\"0\" fontsize=\"10\"]\n";
82 for (
auto* node : network) {
83 fullOut +=
"\"" + node->getEntry().getName() +
"\"" +
85 node->getEntry().getName() +
89 for (
auto* node : network) {
90 for (
auto* innerNode : node->getInnerNodes()) {
91 auto innerEntry = innerNode->getEntry();
92 std::string arrowStyle =
"";
93 fullOut +=
"\"" + node->getEntry().getName() +
"\" -> \"" + innerEntry.getName() +
"\"" + arrowStyle +
";\n";
96 fullOut +=
"labelloc=\"t\";\nlabel=\"" + fName +
"\";\n";
100 ofs.open(fName +
".gv", std::ofstream::out | std::ofstream::trunc);
Network of directed nodes of the type EntryType.
void printNetwork(DirectedNodeNetwork< NodeEntryType, AnyMetaInfo > &network, const std::string &fName)
overloaded print-version for typical activeSector-networks without CACell-stuff
void printCANetwork(DirectedNodeNetwork< NodeEntryType, CACell > &network, const std::string &fName)
TODO.
Abstract base class for different kinds of events.