source: XIOS/dev/dev_olga/src/workflow_graph.hpp @ 1677

Last change on this file since 1677 was 1653, checked in by oabramkina, 5 years ago

Developments for visualization of XIOS workflow.

Branch is spawned from trunk r1649.

Boost library is used for producing Graphviz DOT files. Current results: a DOT file representing a static workflow. For a complete proof of concept, DOT files for each timestamp should be generated. The necessary information has been collected by XIOS, it only requires rearranging the information for graphing (changes in classes CWorkflowGraph and CGraphviz).

File size: 1.5 KB
Line 
1#ifndef __WORKFLOW_GRAPH_HPP__
2#define __WORKFLOW_GRAPH_HPP__
3
4#include "xios_spl.hpp"
5#include "field.hpp"
6#include "garbage_collector.hpp"
7
8namespace xios
9{
10
11  class CWorkflowGraph
12  {
13
14    friend class CGraphviz;
15
16    public:
17
18      CWorkflowGraph();
19
20      /*! Map between fields identified by its id and their filters identified by an integer.
21       * It is filled up during reconstruction of a workflow (in function CField::buildFilterGraph()).
22      */
23      static std::unordered_map <StdString, vector <int> > mapFieldToFilters;
24
25      /*! Map between filter ids and filter types.
26       * It is filled up during reconstruction of a workflow (in function CField::buildFilterGraph()).
27       */
28      static std::unordered_map <int, StdString> mapFilters;
29
30      /*! Map between filters and timestamps.
31       * Timestamps are added into the map at the exit of a filter (in function COutputPin::onOutputReady)
32       */
33      static std::unordered_map <int, vector<Time> > mapFilterTimestamps;
34
35      /*! List of timestamps.
36       * Timestamps are added at the exit of a filter (in function COutputPin::onOutputReady)
37       */
38      static set<Time> timestamps;
39
40    private:
41
42      //! List of fields marked for visualizing of their workflow
43      static vector <StdString> fields;
44
45      //! List of connected filters for fields for visualizing of their workflow
46      static vector <StdString> filters;
47
48      //! Fields to filters connectivity
49      static vector <pair<int, int> > fieldsToFilters;
50
51      static void buildStaticWorkflow();
52
53
54  };
55}
56
57#endif
Note: See TracBrowser for help on using the repository browser.