{ #include "Riostream.h" #include "TFile.h" #include "TH1.h" #include "TH2.h" #include "TNtuple.h" #include "TCanvas.h" #include "TPad.h" #include "TPavesText.h" #include "TStyle.h" #include "TF1.h" #include "TTree.h" #include "TBranch.h" #include "TLegend.h" #include "TImage.h" #include "TGraph.h" TFile* rootfile = new TFile() ; gROOT->Reset(); gStyle->SetOptFit(111111); gStyle->SetOptStat(0000); gStyle->SetPalette(1); ofstream in; // we assume a file basic.dat in the current directory // this file has 3 columns of float data in.open("CalibPerWafer-8167081.txt"); TFile file("resuts-pulser.root_histos.root"); TH2F * hV = (TH2F*)file->Get("h2RatioPerWafer"); for(Int_t ii=1 ;ii<21;ii++) { for(Int_t jj=1 ;jj<17;jj++) { Float_t ratio = hV->GetBinContent(ii,jj); in << ii ; in <<" "; in << jj ; in << " "; in << ratio; in <<" \n"; } } }