Changeset 1679 for XIOS/dev/dev_trunk_omp/src/filter/store_filter.cpp
- Timestamp:
- 07/02/19 11:42:27 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/filter/store_filter.cpp
r1677 r1679 90 90 void CStoreFilter::onInputReady(std::vector<CDataPacketPtr> data) 91 91 { 92 if(CXios::isClient) std::cout<<"CStoreFilter onInputReady"<<std::endl;93 92 94 if(this->tag) 93 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 94 95 if(building_graph) 95 96 { 96 97 this->filterID = InvalidableObject::filterIdGenerator++; 98 int edgeID = InvalidableObject::edgeIdGenerator++; 97 99 98 if(CWorkflowGraph::mapFieldToFilters_ptr ==0) CWorkflowGraph::mapFieldToFilters_ptr = new std::unordered_map <StdString, vector <int>>;99 if(CWorkflowGraph::mapFilters_ptr ==0) CWorkflowGraph::mapFilters_ptr = new std::unordered_map <int, StdString>;100 if(CWorkflowGraph::mapFieldToFilters_ptr_with_info==0) CWorkflowGraph::mapFieldToFilters_ptr_with_info = new std::unordered_map <int, graph_info_box_edge >; 101 if(CWorkflowGraph::mapFilters_ptr_with_info==0) CWorkflowGraph::mapFilters_ptr_with_info = new std::unordered_map <int, graph_info_box_node>; 100 102 101 (*CWorkflowGraph::mapFilters_ptr)[this->filterID] = "Store Filter"; 103 104 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_name = "Store Filter"; 105 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_class = 4; 106 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_filled = 1; 107 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb = 1; 108 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].date = data[0]->date; 109 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].timestamp = data[0]->timestamp; 102 110 103 111 if(CXios::isClient) std::cout<<"CStoreFilter::apply filter tag = "<<this->tag<<std::endl; 104 112 105 if(CXios::isClient )113 if(CXios::isClient && CWorkflowGraph::build_begin) 106 114 { 107 StdString str = data[0]->fieldID +" ts=" + to_string(data[0]->timestamp); 108 (*CWorkflowGraph::mapFieldToFilters_ptr)[str].push_back(data[0]->src_filterID); 109 (*CWorkflowGraph::mapFieldToFilters_ptr)[str].push_back(this->filterID); 115 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]);; 116 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0; 110 117 } 118 else CWorkflowGraph::build_begin = true; 111 119 } 112 120
Note: See TracChangeset
for help on using the changeset viewer.