/*! \file plot.cpp * \brief Makes a histogram and saves it to a ROOT file. * */ #include #include "TFile.h" #include "TF1.h" #include "TH1D.h" using namespace std; int main (int argc, char** argv) { cout << endl << "====================================================" << endl << "| simpleplot |" << endl << "====================================================" << endl << endl; TFile * f = new TFile("output.root", "RECREATE"); TF1 * norm = new TF1("norm", "x*gaus(0)", 0, 10); norm->SetParameters(10.0, 5.0, 2.0); TH1D * hg = new TH1D("test_hist", "", 100, 0.0, 20.0); hg->FillRandom("norm", 100000); f->Write(); f->Close(); } //end of main