Ignore:
Timestamp:
07/02/19 11:42:27 (5 years ago)
Author:
yushan
Message:

MARK: Dynamic workflow graph developement. Branch up to date with trunk @1676. Using vis.js

File:
1 edited

Legend:

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

    r1677 r1679  
    1212                               const CDuration offset /*= NoneDu*/, bool manualTrigger /*= false*/, 
    1313                               bool hasMissingValue /*= false*/, 
    14                                double defaultValue /*= 0.0*/, 
    15                                bool buildWorkflowGraph /*= false*/) 
    16     : COutputPin(gc, manualTrigger, buildWorkflowGraph) 
     14                               double defaultValue /*= 0.0*/) 
     15    : COutputPin(gc, manualTrigger) 
    1716    , grid(grid) 
    1817    , compression(compression) 
     
    6362    } 
    6463 
    65     packet->fieldID = field_id; 
    66     this->output_field_id = field_id; 
    67  
    68  
    69     if(this->tag) 
    70     { 
    71       this->filterID.first = InvalidableObject::filterIdGenerator++;   
    72       packet->src_filterID=this->filterID.first; 
     64     
     65    bool building_graph = this->tag ? packet->timestamp >= this->start_graph && packet->timestamp <= this->end_graph : false; 
     66 
     67    if(building_graph) 
     68    { 
     69      this->filterID = InvalidableObject::filterIdGenerator++;   
     70      packet->src_filterID=this->filterID; 
     71      packet->field = this->field; 
    7372       
    7473       
    75       if(CXios::isClient) std::cout<<"source filter tag = "<<this->tag<<std::endl; 
    76      
    77       if(CWorkflowGraph::mapFilters_ptr==0) CWorkflowGraph::mapFilters_ptr = new std::unordered_map <int, StdString>; 
    78  
    79       (*CWorkflowGraph::mapFilters_ptr)[this->filterID.first] = "Source Filter"; 
    80  
    81       if(CWorkflowGraph::mapFieldToFilters_ptr==0) CWorkflowGraph::mapFieldToFilters_ptr = new std::unordered_map <StdString, vector <int> >; 
    82  
    83  
     74      if(CXios::isClient) std::cout<<"source filter tag = "<<this->tag<<" start = "<<start_graph<<" end = "<<end_graph<<std::endl; 
     75     
     76      if(CWorkflowGraph::mapFilters_ptr_with_info==0) CWorkflowGraph::mapFilters_ptr_with_info = new std::unordered_map <int, graph_info_box_node>; 
     77 
     78      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_name = "Source Filter "+ this->field->getId(); 
     79      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_class = 1; 
     80      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_filled = 1; 
     81      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb = 0; 
     82      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].date = date; 
     83      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].timestamp = packet->timestamp; 
     84 
     85      if(CWorkflowGraph::mapFieldToFilters_ptr_with_info==0) CWorkflowGraph::mapFieldToFilters_ptr_with_info = new std::unordered_map <int, graph_info_box_edge>; 
     86 
     87      CWorkflowGraph::build_begin = true; 
    8488    } 
    8589 
     
    132136      } 
    133137    } 
    134     this->filterID.first = InvalidableObject::filterIdGenerator++; 
    135     packet->src_filterID=this->filterID.first; 
     138    this->filterID = InvalidableObject::filterIdGenerator++; 
     139    packet->src_filterID=this->filterID; 
    136140 
    137141    if(CXios::isClient) std::cout<<"source filter filter tag = "<<this->tag<<std::endl; 
    138      
    139     if(CWorkflowGraph::mapFilters_ptr==0) CWorkflowGraph::mapFilters_ptr = new std::unordered_map <int, StdString>; 
    140  
    141     (*CWorkflowGraph::mapFilters_ptr)[this->filterID.first] = "Source Filter"; 
    142  
    143  
    144142 
    145143    onOutputReady(packet); 
Note: See TracChangeset for help on using the changeset viewer.