212 edm::LogError(
"DependencyGraph") <<
"You have requested an instance of the DependencyGraph Service in the \"" 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.largestModuleID() - boost::num_vertices(
m_graph) + 1;
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.largestModuleID() - boost::num_vertices(
m_graph) + 1;
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";
279 for (
unsigned int i = 0;
i <
paths.size(); ++
i) {
281 auto &graph =
m_graph.create_subgraph();
284 boost::get_property(graph, boost::graph_name) =
paths[
i];
285 boost::get_property(graph, boost::graph_graph_attribute)[
"label"] =
"Path " +
paths[
i];
286 boost::get_property(graph, boost::graph_graph_attribute)[
"labelloc"] =
"bottom";
290 boost::add_vertex(
module->id(), graph);
293 for (
unsigned int i = 0;
i < endps.size(); ++
i) {
295 auto &graph =
m_graph.create_subgraph();
298 boost::get_property(graph, boost::graph_name) = endps[
i];
299 boost::get_property(graph, boost::graph_graph_attribute)[
"label"] =
"EndPath " + endps[
i];
300 boost::get_property(graph, boost::graph_graph_attribute)[
"labelloc"] =
"bottom";
304 boost::add_vertex(
module->id(), graph);
311 bool highlightTriggerResults =
false;
312 for (
int i = 0;
i <
size; ++
i) {
313 if (
m_graph.m_graph[
i].label ==
"TriggerResults") {
315 highlightTriggerResults =
highlighted(
"TriggerResults");
322 for (
unsigned int i = 0;
i <
paths.size(); ++
i) {
327 attributes[
"fillcolor"] =
highlighted(
module->moduleLabel()) ?
"lightgreen" :
"white";
329 edm::LogInfo(
"DependencyGraph") <<
"module " <<
module->moduleLabel() <<
" follows module " 332 bool found = edge_status.second;
335 auto const &edge = edge_status.first;
337 edgeAttributes[
"style"] =
"dashed";
340 edgeAttributes[
"color"] =
"darkgreen";
348 for (
int j = 0;
j <
size; ++
j) {
350 edm::LogInfo(
"DependencyGraph") <<
"module " <<
paths[
i] <<
" implicitly follows module " 354 auto const &edge = edge_status.first;
356 edgeAttributes[
"style"] =
"dashed";
360 edgeAttributes[
"color"] =
"darkgreen";
364 auto const &edge = edge_status.first;
366 edgeAttributes[
"style"] =
"dashed";
368 if (highlightedPath and highlightTriggerResults)
369 edgeAttributes[
"color"] =
"darkgreen";
378 for (
unsigned int i = 0;
i < endps.size(); ++
i) {
383 attributes[
"fillcolor"] =
highlighted(
module->moduleLabel()) ?
"lightgreen" :
"white";
385 edm::LogInfo(
"DependencyGraph") <<
"module " <<
module->moduleLabel() <<
" follows module " 386 <<
previous->moduleLabel() <<
" in EndPath " <<
i;
388 bool found = edge_status.second;
391 auto const &edge = edge_status.first;
393 edgeAttributes[
"style"] =
"dashed";
396 edgeAttributes[
"color"] =
"darkgreen";
Log< level::Error, false > LogError
static std::string const triggerResults
Log< level::Info, false > LogInfo
bool m_showPathDependencies
static EDMModuleType edmModuleTypeEnum(edm::ModuleDescription const &module)
static constexpr const char * shapes[]
bool highlighted(std::string const &module)