Added functions to save data in PSTH sink