Belle II Software light-2406-ragdoll
DataFlowVisualization.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/datastore/DependencyMap.h>
12
13#include <iosfwd>
14
15namespace Belle2 {
20 class Module;
21 class Path;
22
25 public:
27 explicit DataFlowVisualization(const DependencyMap* dependencyMap);
28
34 void visualizePath(const std::string& filename, const Path& path);
35
40 static void executeModuleAndCreateIOPlot(const std::string& module);
41 private:
43 void generateModulePlot(std::ofstream& file, const Module& mod, bool steeringFileFlow = false);
44
46 static void plotPath(std::ofstream& file, const Path& path, const std::string& pathName = "");
47
49 bool checkArrayUnknown(const std::string& name, const DependencyMap::ModuleInfo& info);
50
53
54 std::set<std::string> m_allInputs;
55 std::set<std::string> m_allOutputs;
56 std::set<std::string> m_unknownArrays;
60 };
62}
class to visualize data flow between modules.
std::set< std::string > m_allInputs
set of all inputs (including optionals), for steering file visualisation.
static void executeModuleAndCreateIOPlot(const std::string &module)
Create independent I/O graph for a single module (without requiring a steering file).
bool checkArrayUnknown(const std::string &name, const DependencyMap::ModuleInfo &info)
If the given array name isn't found in any of info's fields, it is added to m_unknownArrays (and true...
std::set< std::string > m_allOutputs
set of all outputs, for steering file visualisation.
static void plotPath(std::ofstream &file, const Path &path, const std::string &pathName="")
Create a subgraph for the given Path (including conditional paths).
void generateModulePlot(std::ofstream &file, const Module &mod, bool steeringFileFlow=false)
Create I/O graph for a single module (written to file).
std::string m_arrowcolor[DependencyMap::c_NEntryTypes]
arrow colors.
void visualizePath(const std::string &filename, const Path &path)
Create graphs with datastore inputs/outputs of each module in path.
std::string m_fillcolor[DependencyMap::c_NEntryTypes]
fill colors.
const DependencyMap * m_map
Stores information on inputs/outputs of each module, as obtained by require()/createEntry();.
std::set< std::string > m_unknownArrays
set of array only being used in relations, for steering file visualisation.
Collect information about the dependencies between modules.
Definition: DependencyMap.h:29
@ c_NEntryTypes
size of this enum.
Definition: DependencyMap.h:37
Base class for Modules.
Definition: Module.h:72
Implements a path consisting of Module and/or Path objects.
Definition: Path.h:38
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24
Stores information on inputs/outputs of a module, as obtained by requireInput()/optionalInput()/regis...
Definition: DependencyMap.h:41