Classes | Namespaces | Typedefs | Functions
DataFlowDumper_module.cc File Reference
#include "art/Framework/Core/ModuleMacros.h"
#include "art/Framework/Modules/ProvenanceDumper.h"
#include "canvas/Persistency/Provenance/ProductID.h"
#include "canvas/Utilities/Exception.h"
#include "fhiclcpp/types/Atom.h"
#include "fhiclcpp/types/Name.h"
#include <algorithm>
#include <fstream>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  art::DataFlow
 
struct  art::DataFlow::Config
 

Namespaces

 art
 

Typedefs

using art::DataFlowDumper = ProvenanceDumper< DataFlow >
 

Functions

void write_id (art::ProductID const pid, std::ostream &os)
 
void write_id (art::Provenance const &p, std::ostream &os)
 
void format_product_node (std::string const &fcn, std::string const &pin, std::ostream &os)
 
void write_product_node (art::Provenance const &p, std::ostream &os, int debug)
 
void write_module_id (art::Provenance const &p, std::ostream &os)
 
std::size_t color (std::string const &procname)
 
void write_module_node (art::Provenance const &p, std::string const &colorscheme, std::ostream &os)
 
void write_creator_line (art::Provenance const &p, std::string const &colorscheme, std::ostream &os, int debug)
 
void write_parent_id (art::ProductID const parent, std::ostream &os)
 
void write_parentage_line (art::Provenance const &p, art::ProductID const parent, std::ostream &os, int debug)
 

Function Documentation

std::size_t color ( std::string const &  procname)

Definition at line 128 of file DataFlowDumper_module.cc.

129 {
130  static std::vector<std::string> names_seen;
131  auto it = std::find(begin(names_seen), end(names_seen), procname);
132  if (it == end(names_seen)) {
133  names_seen.push_back(procname);
134  return names_seen.size();
135  }
136  return std::distance(begin(names_seen), it) + 1;
137 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
void format_product_node ( std::string const &  fcn,
std::string const &  pin,
std::ostream &  os 
)

Definition at line 99 of file DataFlowDumper_module.cc.

102 {
103  os << " [label = \"" << fcn;
104  if (!pin.empty())
105  os << "/" << pin;
106  os << "\" shape = box];\n";
107 }
void write_creator_line ( art::Provenance const &  p,
std::string const &  colorscheme,
std::ostream &  os,
int  debug 
)

Definition at line 149 of file DataFlowDumper_module.cc.

153 {
154  if (debug > 0) {
155  os << "# write_creator_line for provenance: " << &p << '\n';
156  }
157  write_module_id(p, os);
158  write_module_node(p, colorscheme, os);
159  write_module_id(p, os);
160  os << " -> ";
161  write_id(p, os);
162  os << ";\n";
163 }
void write_module_node(art::Provenance const &p, std::string const &colorscheme, std::ostream &os)
void write_module_id(art::Provenance const &p, std::ostream &os)
p
Definition: test.py:223
void write_id(art::ProductID const pid, std::ostream &os)
void write_id ( art::ProductID const  pid,
std::ostream &  os 
)

Definition at line 86 of file DataFlowDumper_module.cc.

87 {
88  os << "\"b" << pid << '\"';
89 }
void write_id ( art::Provenance const &  p,
std::ostream &  os 
)

Definition at line 92 of file DataFlowDumper_module.cc.

93 {
94  write_id(p.productID(), os);
95 }
p
Definition: test.py:223
void write_id(art::ProductID const pid, std::ostream &os)
void write_module_id ( art::Provenance const &  p,
std::ostream &  os 
)

Definition at line 122 of file DataFlowDumper_module.cc.

123 {
124  os << '\"' << p.moduleLabel() << '/' << p.processName() << '\"';
125 }
p
Definition: test.py:223
void write_module_node ( art::Provenance const &  p,
std::string const &  colorscheme,
std::ostream &  os 
)

Definition at line 140 of file DataFlowDumper_module.cc.

143 {
144  os << " [ colorscheme=" << colorscheme << " color=" << color(p.processName())
145  << " style=filled ];\n";
146 }
p
Definition: test.py:223
std::size_t color(std::string const &procname)
void write_parent_id ( art::ProductID const  parent,
std::ostream &  os 
)

Definition at line 166 of file DataFlowDumper_module.cc.

167 {
168  os << 'b' << parent;
169 }
def parent(G, child, parent_type)
Definition: graph.py:67
void write_parentage_line ( art::Provenance const &  p,
art::ProductID const  parent,
std::ostream &  os,
int  debug 
)

Definition at line 172 of file DataFlowDumper_module.cc.

176 {
177  if (debug > 0) {
178  os << "# write_parentage_line for provenance: " << &p << " parent "
179  << parent << '\n';
180  }
181  write_parent_id(parent, os);
182  os << " -> ";
183  write_module_id(p, os);
184  os << ";\n";
185 }
void write_module_id(art::Provenance const &p, std::ostream &os)
p
Definition: test.py:223
void write_parent_id(art::ProductID const parent, std::ostream &os)
def parent(G, child, parent_type)
Definition: graph.py:67
void write_product_node ( art::Provenance const &  p,
std::ostream &  os,
int  debug 
)

Definition at line 112 of file DataFlowDumper_module.cc.

113 {
114  if (debug > 0) {
115  os << "# write_product_node for provenance: " << &p << '\n';
116  }
117  write_id(p, os);
118  format_product_node(p.friendlyClassName(), p.productInstanceName(), os);
119 }
p
Definition: test.py:223
void write_id(art::ProductID const pid, std::ostream &os)
void format_product_node(std::string const &fcn, std::string const &pin, std::ostream &os)