// // plotmaker.C - root macro for generating standard plots of dark box // pulse height distributions for a bunch of 30 fibers. // Results are stored in the histos directory where the // web interfaces to fiberQA expects to find them. // // author: richard.t.jones at uconn.edu // version: june 1, 2014 // #include #include void plotmaker(int run) { char fname[128]; sprintf(fname,"data/simple_%3.3d.root",run); TFile infile(fname); if (! infile.IsOpen()) { cout << "Input file %s not found, cannot continue." << fname << endl; } TCanvas c1("c1","C1",20,20,400,400); for (int row=5; row > 0; --row) { for (int col=0; col < 6; ++col) { int id=col*5+row; char name[10]; sprintf(name,"hhigh%d",id); TH1D *h = infile.Get(name); if (h != 0) { h->Rebin(16); h->Draw(); char imagefile[80]; sprintf(imagefile,"histos/run_%3.3d/fiber_%d.png",run,id); c1.Print(imagefile); } else { cout << "Cannot get object " << name << endl; } } } }