Creates many canvases and save as images or pdf.
This macro creates 100 canvases and store them in different images files using TCanvas::SaveAll() method. Demonstrated how different output format can be used in batch mode.
void saveall()
{
std::vector<TPad *> pads;
for (
int n = 0;
n < 100; ++
n) {
h1->SetDirectory(
nullptr);
h1->FillRandom(
"gaus", 10000);
}
}
static Bool_t SaveAll(const std::vector< TPad * > &={}, const char *filename="", Option_t *option="")
Save provided pads/canvases into the image file(s) Filename can include printf argument for image num...
1-D histogram with an int per channel (see TH1 documentation)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
- Author
- Sergey Linev
Definition in file saveall.C.