Ignore:
Timestamp:
06/25/19 16:14:54 (5 years ago)
Author:
yushan
Message:

MARK: Dynamic workflow graph developement. Branch up to date with trunk @1663.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/src/filter/pass_through_filter.cpp

    r1668 r1677  
    11#include "pass_through_filter.hpp" 
     2#include "workflow_graph.hpp" 
    23 
    34namespace xios 
     
    56  CPassThroughFilter::CPassThroughFilter(CGarbageCollector& gc, bool buildWorkflowGraph /*= false*/) 
    67    : CFilter(gc, 1, this, buildWorkflowGraph) 
    7   { /* Nothing to do */ } 
     8  {  
     9  } 
    810 
    911  CDataPacketPtr CPassThroughFilter::apply(std::vector<CDataPacketPtr> data) 
    1012  { 
     13        if(this->tag) 
     14    { 
     15      std::cout<<"CPassThroughFilter::apply tag = "<<this->tag<<std::endl; 
     16      this->filterID = InvalidableObject::filterIdGenerator++; 
     17      if(CWorkflowGraph::mapFilters_ptr==0) CWorkflowGraph::mapFilters_ptr = new std::unordered_map <int, StdString>; 
     18 
     19      (*CWorkflowGraph::mapFilters_ptr)[this->filterID] = "Pass Through Filter"; 
     20 
     21      if(CWorkflowGraph::mapFieldToFilters_ptr==0) CWorkflowGraph::mapFieldToFilters_ptr = new std::unordered_map <StdString, vector <int> >; 
     22       
     23      StdString str = data[0]->fieldID + " ts=" + to_string(data[0]->timestamp); 
     24      (*CWorkflowGraph::mapFieldToFilters_ptr)[str].push_back(data[0]->src_filterID); 
     25      (*CWorkflowGraph::mapFieldToFilters_ptr)[str].push_back(this->filterID); 
     26      data[0]->src_filterID=this->filterID; 
     27 
     28    } 
     29     
     30    data[0]->fieldID = this->output_field_id; 
     31     
     32 
    1133    return data[0]; 
    1234  } 
     35 
    1336} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.