212 edm::LogError(
"DependencyGraph") <<
"You have requested an instance of the DependencyGraph Service in the \"" 213 << context.processName()
214 <<
"\" SubProcess, which is not supported.\nPlease move it to the main process.";
218 if (not context.isSubProcess()) {
220 boost::get_property(
m_graph, boost::graph_name) = context.processName();
221 boost::get_property(
m_graph, boost::graph_graph_attribute)[
"label"] =
"process " + context.processName();
222 boost::get_property(
m_graph, boost::graph_graph_attribute)[
"labelloc"] =
"top";
225 auto size = pathsAndConsumes.allModules().size();
226 for (
size_t i = 0;
i <
size; ++
i)
232 auto &graph =
m_graph.create_subgraph();
235 boost::get_property(graph, boost::graph_name) =
"cluster" + context.processName();
236 boost::get_property(graph, boost::graph_graph_attribute)[
"label"] =
"subprocess " + context.processName();
237 boost::get_property(graph, boost::graph_graph_attribute)[
"labelloc"] =
"top";
240 auto size = pathsAndConsumes.allModules().size();
241 for (
size_t i = 0;
i <
size; ++
i)
242 boost::add_vertex(graph);
251 attributes[
"label"] =
module->moduleLabel();
252 attributes[
"tooltip"] =
module->moduleName();
254 attributes[
"style"] =
"filled";
255 attributes[
"color"] =
"black";
256 attributes[
"fillcolor"] =
highlighted(
module->moduleLabel()) ?
"green" :
"lightgrey";
260 auto const &
paths = pathsAndConsumes.paths();
261 auto const &endps = pathsAndConsumes.endPaths();
266 edm::LogInfo(
"DependencyGraph") <<
"module " <<
consumer->moduleLabel() <<
" depends on module " 271 auto const &edge = edge_status.first;
273 attributes[
"color"] =
"darkgreen";
280 for (
unsigned int i = 0;
i < paths.size(); ++
i) {
285 attributes[
"fillcolor"] =
highlighted(
module->moduleLabel()) ?
"lightgreen" :
"white";
287 edm::LogInfo(
"DependencyGraph") <<
"module " <<
module->moduleLabel() <<
" follows module " 289 auto edge_status = boost::lookup_edge(
module->id(), previous->
id(),
m_graph);
290 bool found = edge_status.second;
293 auto const &edge = edge_status.first;
295 edgeAttributes[
"style"] =
"dashed";
298 edgeAttributes[
"color"] =
"darkgreen";
304 for (
unsigned int i = 0;
i < endps.size(); ++
i) {
309 attributes[
"fillcolor"] =
highlighted(
module->moduleLabel()) ?
"lightgreen" :
"white";
310 if (previous and m_showPathDependencies) {
311 edm::LogInfo(
"DependencyGraph") <<
"module " <<
module->moduleLabel() <<
" follows module " 313 auto edge_status = boost::lookup_edge(
module->id(), previous->
id(),
m_graph);
314 bool found = edge_status.second;
317 auto const &edge = edge_status.first;
319 edgeAttributes[
"style"] =
"dashed";
322 edgeAttributes[
"color"] =
"darkgreen";
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
std::string const & moduleLabel() const
bool m_showPathDependencies
static EDMModuleType edmModuleTypeEnum(edm::ModuleDescription const &module)
static const char * shapes[]
bool highlighted(std::string const &module)