void test(){ #define PI 3.14; #define ROWS 125003; #define COL 17; #define MAXZ 500; int nbins = MAXZ; int nch = MAXZ; double ro = 1; double emax = 0; double e0 = 0; double np = 0; double fnp = 0; double rseed1 = 0; double rseed2 = 0; double voxel = 0; double tot = 0; double dr = 0; double nr = 0; double dz = 0; double nz = 0; double norm = 0; double area = 0; double edep[ROWS][COL]; double dose[MAXZ][COL]; int nl=0; int i,j,k; char inputFile[100]; gStyle->SetOptStat(0); namespace std; for(i=0 ; i> e0 >> np >> rseed1 >> rseed2 >> dr >> nr >> dz >> nz; cout<<"file # "<> voxel >> tot; if(voxel <= nr*nz+3 && voxel > 0){ edep[voxel-1][0]=edep[voxel-1][0]+tot; k++; } voxel=tot; nl++; j++; } fnp=fnp+np; if(e0!=0){ cout<Divide(1,1); pad1->Draw(); //Booking histogram TH1F *h0 = new TH1F("h0", " Total ", nbins, 0., nch); for(k=0 ; k<4 ; k++){ for(j=0 ; jFill(j,dose[j][0]); } //Title TPaveLabel *title = new TPaveLabel(0.1,0.94,0.9,0.98,"TITLE"); title->SetFillColor(16); title->Draw(); //Legend TLegend* leg1 = new TLegend(0.7,0.7,0.89,0.89); leg1->AddEntry(h0,"leg","l"); leg1->Draw(); pad1->cd(1); h0->SetLineColor(1); h0->Draw("his"); gROOT->SetStyle("Plain"); }