#include "TH1.h" #include void printHisto(const char* file) { // Create a new histogram (see documentation) TH1F *h = new TH1F("h","Histogram from file",100,-10,10); ifstream is(file); double value = -1E30; while (is) { is >> value; h->Fill(value); } is.close(); //Change histogram line color and draw it h->SetLineColor(1); //Black h->SetFillColor(2); //Red h->Draw("E"); h->Draw("SAME"); }