User-defined function in TTree::Draw()

Thank you. I know that it is possible to add some user-defined functions. For example, if I define “func_int” as follows

int func_int(int x){
  return 5*x;
}

And add an appropriate line in my LinkDef.h,

#pragma link C++ function func_int;

Then I can use “func_int” from inside a TTree::Draw() command. So far, I’ve had issues when the argument being passed to the function is a user-defined C++ object.