readGraph.C 251 Bytes
Newer Older
himyss's avatar
himyss committed
1 2 3 4 5 6 7 8 9 10 11 12
{

  TFile *f = new TFile("myGraph.root");
  TGraph *myGraph = (TGraph*)f->Get("Graph");
  for (int i = 0; i < myGraph->GetN(); i++)  {
    cout << "{" <<   *(myGraph->GetX()+i) << "," << *(myGraph->GetY()+i) << "}, "; 
  }

  // myGraph->Draw();

}