void makeCanvasHist1d(int canvasId, char* canvasTitle, int xsize, int ysize, int npad, int nxpad, int nypad, TH1F **hist1dPtrAry) { TCanvas* canvasPtr = new TCanvas("standardCanvas", canvasTitle, xsize, ysize); TPad* padPtrs[100]; getPads(npad, nxpad, nypad, padPtrs); for (int ip = 0; ip < npad; ip++) { padPtrs[ip]->cd(); if (hist1dPtrAry[ip]) { hist1dPtrAry[ip]->Draw(); } } padPtrs[npad]->cd(); TPaveLabel* titlePave = new TPaveLabel(0.0, 0.0, 1.0, 1.0, canvasPtr->GetTitle()); titlePave->Draw(); char pngFile[128]; sprintf(pngFile, "standard%d.png", canvasId); canvasPtr->Print(pngFile, "png"); return; }