With this framwork, you can calculate PMT gains based on the model-independent method described in this paper: http://arxiv.org/abs/1602.03150
Unlike conventional fitting methods, this method makes it possible for us to estimate the single PE mean and variance statistically without making any assumption about the underlying shape of the single PE spectrum even in the condition where the bad shape of the pedestal makes fitting very difficult.