Using TChain in an h file to include in a C file

Generate your analysis skeleton using:

{
  TChain *t = new TChain("T");
  t->Add("beam_run_[12].root");
  // t->Print();
  t->MakeClass("MyAnalysis");
  delete t; // no longer needed
}