replace raw pointer by vector in GatherUnit
replace raw pointer by vector in PlotUnit