#include "pass_through_filter.hpp" #include "workflow_graph.hpp" #include "field.hpp" namespace xios { CPassThroughFilter::CPassThroughFilter(CGarbageCollector& gc) : CFilter(gc, 1, this) { } CDataPacketPtr CPassThroughFilter::apply(std::vector data) { bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; if(building_graph) { std::cout<<"CPassThroughFilter::apply tag = "<tag<<" start = "<filterID].filter_class = 5; (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_filled = 1; (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb = 1; (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].date = data[0]->date; (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].timestamp = data[0]->timestamp; if(CWorkflowGraph::mapFieldToFilters_ptr_with_info==0) CWorkflowGraph::mapFieldToFilters_ptr_with_info = new std::unordered_map ; if(CWorkflowGraph::build_begin) { CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0; } else CWorkflowGraph::build_begin = true; data[0]->src_filterID=this->filterID; } data[0]->field = this->field; return data[0]; } } // namespace xios