#include #include #include "TH1F.h" using namespace std; int readData(){ ifstream file("output.data"); TH1F* h = new TH1F("h","random",100,0.,1.); int nlines=0; if (file.good()) { while (!file.eof()) { float x; file >> x; cout << "Entry:" << nlines << ": X " << x << endl; nlines++; h->Fill(x); } } h->DrawCopy(); return nlines; }