249 <<
"You have requested an instance of the DependencyGraph Service in the \"" << context.processName()
250 <<
"\" SubProcess, which is not supported.\nPlease move it to the main process.";
254 if (not context.isSubProcess()) {
256 boost::get_property(
m_graph, boost::graph_name) = context.processName();
257 boost::get_property(
m_graph, boost::graph_graph_attribute)[
"label"] =
"process " + context.processName();
258 boost::get_property(
m_graph, boost::graph_graph_attribute)[
"labelloc"] =
"top";
261 auto size = pathsAndConsumes.allModules().size();
262 for (
size_t i = 0;
i <
size; ++
i)
271 boost::get_property(
graph, boost::graph_name) =
"cluster" + context.processName();
272 boost::get_property(
graph, boost::graph_graph_attribute)[
"label"] =
"subprocess " + context.processName();
273 boost::get_property(
graph, boost::graph_graph_attribute)[
"labelloc"] =
"top";
276 auto size = pathsAndConsumes.allModules().size();
277 for (
size_t i = 0;
i <
size; ++
i)
278 boost::add_vertex(
graph);
286 attributes[
"label"] =
module->moduleLabel();
287 attributes[
"tooltip"] =
module->moduleName();
289 attributes[
"style"] =
"filled";
290 attributes[
"color"] =
"black";
291 attributes[
"fillcolor"] =
highlighted(
module->moduleLabel()) ?
"green" :
"lightgrey";
295 auto const & paths = pathsAndConsumes.paths();
296 auto const & endps = pathsAndConsumes.endPaths();
301 edm::LogInfo(
"DependencyGraph") <<
"module " << consumer->moduleLabel() <<
" depends on module " <<
module->moduleLabel();
302 auto edge_status = boost::add_edge(consumer->id(),
module->id(),
m_graph);
305 auto const & edge = edge_status.first;
307 attributes[
"color"] =
"darkgreen";
314 for (
unsigned int i = 0;
i < paths.size(); ++
i) {
319 attributes[
"fillcolor"] =
highlighted(
module->moduleLabel()) ?
"lightgreen" :
"white";
322 auto edge_status = boost::lookup_edge(
module->id(), previous->
id(),
m_graph);
323 bool found = edge_status.second;
326 auto const & edge = edge_status.first;
328 attributes[
"style"] =
"dashed";
331 attributes[
"color"] =
"darkgreen";
337 for (
unsigned int i = 0;
i < endps.size(); ++
i) {
342 attributes[
"fillcolor"] =
highlighted(
module->moduleLabel()) ?
"lightgreen" :
"white";
343 if (previous and m_showPathDependencies) {
345 auto edge_status = boost::lookup_edge(
module->id(), previous->
id(),
m_graph);
346 bool found = edge_status.second;
349 auto const & edge = edge_status.first;
351 attributes[
"style"] =
"dashed";
354 attributes[
"color"] =
"darkgreen";
std::string const & moduleLabel() const
boost::subgraph< boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, boost::property< boost::vertex_attribute_t, GraphvizAttributes, node >, boost::property< boost::edge_index_t, int, boost::property< boost::edge_attribute_t, GraphvizAttributes > >, boost::property< boost::graph_name_t, std::string, boost::property< boost::graph_graph_attribute_t, GraphvizAttributes, boost::property< boost::graph_vertex_attribute_t, GraphvizAttributes, boost::property< boost::graph_edge_attribute_t, GraphvizAttributes > > > > > > m_graph
bool m_showPathDependencies
static EDMModuleType edmModuleTypeEnum(edm::ModuleDescription const &module)
static const char * shapes[]
bool highlighted(std::string const &module)
T get(const Candidate &c)