source: XIOS/dev/dev_trunk_omp/src/workflow_graph.hpp @ 1671

Last change on this file since 1671 was 1671, checked in by yushan, 5 years ago

MARK: branch merged with trunk @1663. One output graph file with output file names in file writer filter.

File size: 1.8 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_ptr;
24      #pragma omp threadprivate(mapFieldToFilters_ptr)
25
26      /*! Map between filter ids and filter types.
27       * It is filled up during reconstruction of a workflow (in function CField::buildFilterGraph()).
28       */
29      static std::unordered_map <int, StdString> *mapFilters_ptr;
30      #pragma omp threadprivate(mapFilters_ptr)
31
32      /*! Map between filters and timestamps.
33       * Timestamps are added into the map at the exit of a filter (in function COutputPin::onOutputReady)
34       */
35      static std::unordered_map <int, vector<Time> > *mapFilterTimestamps_ptr;
36      #pragma omp threadprivate(mapFilterTimestamps_ptr)
37
38      /*! List of timestamps.
39       * Timestamps are added at the exit of a filter (in function COutputPin::onOutputReady)
40       */
41      static set<Time> *timestamps_ptr;
42      #pragma omp threadprivate(timestamps_ptr)
43
44    private:
45
46      //! List of fields marked for visualizing of their workflow
47      static vector <StdString> fields;
48
49      //! List of connected filters for fields for visualizing of their workflow
50      static vector <StdString> filters;
51
52      //! Fields to filters connectivity
53      static vector <pair<int, int> > fieldsToFilters;
54
55      static void buildStaticWorkflow();
56      static void showStaticWorkflow();
57
58
59  };
60}
61
62#endif
Note: See TracBrowser for help on using the repository browser.