TNtuple* makeNTuple(int i)
{
  TNtuple* ret = new TNtuple(Form("n%d", i), "Test", Form("x/I"));
  for (size_t j = 0; j < i+1; j++) 
    ret->Fill(Double_t(j));
  return ret;
}

void
foo()
{
  const int n = 10;
  TNtuple** a = new TNtuple*[n];
  for (int j = 0; j < n; j++) a[j] = makeNTuple(j);

  int total = 0;
  for (int j = 0; j < n; j++) {
    TNtuple* x =  a[j];
    total += x->GetEntries();
  }
  std::cout << "Total is " << total << std::endl;
}


