void makeCanvas(int canvasId, char* canvasTitle, int xsize, int ysize, int npad, int nxpad, int nypad, char drawString[][128], char cutString[][128]) { char canvasName[128]; sprintf(canvasName, "canvas%d", canvasId); TCanvas* canvasPtr = new TCanvas(canvasName, canvasTitle, xsize, ysize); TPad* padPtrs[100]; getPads(npad, nxpad, nypad, padPtrs); for (int ip = 0; ip < npad; ip++) { padPtrs[ip]->cd(); if (strcmp(drawString[ip], "NULL")) { chainPtr->Draw(drawString[ip], cutString[ip]); } } 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; }