replace raw pointer by vector in TonemapUnit