/// \file /// \ingroup tutorial_hist /// \notebook -js /// Illustrate use of the TH1::GetCumulative method. /// /// \macro_image /// \macro_code /// /// \author M. Schiller #include #include #include #include "TH1.h" #include "TTree.h" #include "TNtuple.h" #include "TH1D.h" #include "TCanvas.h" #include "TRandom.h" #include #include #include #include #include #include #include void ants() { TCanvas* c = new TCanvas(); Int_t i=0; Int_t nlines = 0; Float_t x,y,z,a,b; ifstream inp; //------------------------------------------ Read -------------------------------------------------- TNtuple *nStOpt_06 = new TNtuple("ntuple","loss accounts","x:y:z"); inp.open("8000_loss_history_0.06.txt"); while (inp >> x >> y >> z){ inp >> x >> y >> z; nStOpt_06->Fill(x,y,z); nlines++; } inp.close(); cout << " found " << nlines << " lines in 8000_loss_history_0.06.txt" << endl; cout << nStOpt_06->GetEntries() <Draw("y:x"); TGraph *gr = new TGraph(nStOpt_06->GetSelectedRows(),nStOpt_06->GetV2(), nStOpt_06->GetV1()); gr->Draw("al"); }