TF1 called from member funciton of a Class not working properly