Listing 5. Print Macro

//------------ begin method.C
{
  gSystem->Load("Person.so");
  TClass *c = gROOT->GetClass("Person");
  TList *lm = c->GetListOfMethods();
  TIter next(lm);
  TMethod *m;
  while (m = (TMethod *)next()) {
  printf("%s %s%s\n", m->GetReturnTypeName(),
   m->GetName(), m->GetSignature());
}
}