void PedestalMeanRMSDumper(TCanvas* c1 , const char* filename = "toto_125", const char* dirname = "rawdataplotter", const char* mean = "", const char* gain = "HighGain", const char* connected = "", const int nhexaboards = 1, const int nSCAs = 13) { char name[100]; TH2Poly *h2; TFile *file; TPad *p1= new TPad("p1","",0.12,0.96,0.87,0.99); p1->Draw(); c1->cd(); TPad *p2= new TPad("p2","",0.01,0.02,0.99,0.95); p2->Draw(); p2->cd(); p2->Divide(4,4,1.e-5, 1.e-5); //cout<cd(name); for (int ihexaboard = 0; ihexaboard < nhexaboards; ihexaboard++) { int ncanvas1=0; int ncanvas2=0; c1->cd(); p1->cd(); if (strncmp(connected,"",1) == 0) { sprintf(name,"Ped%s: Hexaboard %d, %s, SCA: 1-9, Conn. Chan.", mean, ihexaboard, gain); } else { sprintf(name,"Ped%s: Hexaboard %d, %s, SCA: 1-9, UnConn. Chan.", mean, ihexaboard, gain); } cout<< "name: " << name<SetNDC(); main_title->SetTextSize(0.8); //<----------------------Size of main_title main_title->SetTextFont(42); main_title->SetTextColor(2); main_title->SetTextAlign(1); //(31); // align right main_title->Draw(); for (int iSCA = 0; iSCA < nSCAs; iSCA++) { ncanvas2++; p2->cd(ncanvas2); if(strncmp(mean,"",1) == 0) sprintf(name,"%s%s_HexaBoard%d_SCA%d", connected, gain, ihexaboard, iSCA); else sprintf(name,"%sNoise_%s_HexaBoard%d_SCA%d", connected, gain, ihexaboard, iSCA); h2 = (TH2Poly*) gDirectory->Get(name); h2->Draw("colz,text"); } p1->Modified(); p1->Update(); p2->Modified(); p2->Update(); c1->Update(); sprintf(name, "tester_For%s.ps", filename); c1->Print(name); delete main_title; } delete p1; delete p2; c1->Update(); } void DoSingleChannelPlots() { char name[100]; sprintf(name, "tester_For%s.ps", "toto_125"); TCanvas *c1 = new TCanvas("c1", "", 500, 600); sprintf(name, "tester_For%s.ps[", "toto_125"); c1->Print(name); PedestalMeanRMSDumper(c1, "toto_125", "rawdataplotter","", "HighGain", "" ); PedestalMeanRMSDumper(c1, "toto_125", "rawdataplotter","RMS", "HighGain", "" ); sprintf(name, "tester_For%s.ps]", "toto_125"); c1->Print(name); }